private static string[] NewRestrictionAllowOnly(string[] allowonly, string[] preventusage)
{
List<string> newlist = null;
for (int i = 0; i < allowonly.Length; ++i)
{
if (0 > Array.BinarySearch(preventusage, allowonly[i], StringComparer.Ordinal))
{
if (null == newlist)
{
newlist = new List<string>();
}
newlist.Add(allowonly[i]);
}
}
string[] restrictionValues = null;
if (null != newlist)
{
restrictionValues = newlist.ToArray();
}
Verify(restrictionValues);
return restrictionValues;
}