mscorlib(4.0.0.0) API with additions
ResourcePermissionBase.cs
1 using System.Collections;
2 using System.Reflection;
4 using System.Text;
5 
7 {
10  [SecurityPermission(SecurityAction.InheritanceDemand, ControlEvidence = true, ControlPolicy = true)]
12  {
13  [SuppressUnmanagedCodeSecurity]
14  private static class UnsafeNativeMethods
15  {
16  [DllImport("kernel32.dll", BestFitMapping = false, CharSet = CharSet.Auto)]
17  internal static extern bool GetComputerName(StringBuilder lpBuffer, ref int nSize);
18  }
19 
20  private static volatile string computerName;
21 
22  private string[] tagNames;
23 
24  private Type permissionAccessType;
25 
26  private bool isUnrestricted;
27 
28  private Hashtable rootTable = CreateHashtable();
29 
31  public const string Any = "*";
32 
34  public const string Local = ".";
35 
36  private string ComputerName
37  {
38  get
39  {
40  if (computerName == null)
41  {
42  lock (typeof(ResourcePermissionBase))
43  {
44  if (computerName == null)
45  {
46  StringBuilder stringBuilder = new StringBuilder(256);
47  int nSize = stringBuilder.Capacity;
48  UnsafeNativeMethods.GetComputerName(stringBuilder, ref nSize);
49  computerName = stringBuilder.ToString();
50  }
51  }
52  }
53  return computerName;
54  }
55  }
56 
57  private bool IsEmpty
58  {
59  get
60  {
61  if (!isUnrestricted)
62  {
63  return rootTable.Count == 0;
64  }
65  return false;
66  }
67  }
68 
73  protected Type PermissionAccessType
74  {
75  get
76  {
77  return permissionAccessType;
78  }
79  set
80  {
81  if (value == null)
82  {
83  throw new ArgumentNullException("value");
84  }
85  if (!value.IsEnum)
86  {
87  throw new ArgumentException(SR.GetString("PermissionBadParameterEnum"), "value");
88  }
89  permissionAccessType = value;
90  }
91  }
92 
97  protected string[] TagNames
98  {
99  get
100  {
101  return tagNames;
102  }
103  set
104  {
105  if (value == null)
106  {
107  throw new ArgumentNullException("value");
108  }
109  if (value.Length == 0)
110  {
111  throw new ArgumentException(SR.GetString("PermissionInvalidLength", "0"), "value");
112  }
113  tagNames = value;
114  }
115  }
116 
119  {
120  }
121 
126  {
127  switch (state)
128  {
129  case PermissionState.Unrestricted:
130  isUnrestricted = true;
131  break;
132  case PermissionState.None:
133  isUnrestricted = false;
134  break;
135  default:
136  throw new ArgumentException(SR.GetString("InvalidPermissionState"), "state");
137  }
138  }
139 
140  private static Hashtable CreateHashtable()
141  {
143  }
144 
150  {
151  if (entry == null)
152  {
153  throw new ArgumentNullException("entry");
154  }
155  if (entry.PermissionAccessPath.Length != TagNames.Length)
156  {
157  throw new InvalidOperationException(SR.GetString("PermissionNumberOfElements"));
158  }
159  Hashtable hashtable = rootTable;
160  string[] permissionAccessPath = entry.PermissionAccessPath;
161  for (int i = 0; i < permissionAccessPath.Length - 1; i++)
162  {
163  if (hashtable.ContainsKey(permissionAccessPath[i]))
164  {
165  hashtable = (Hashtable)hashtable[permissionAccessPath[i]];
166  continue;
167  }
168  Hashtable hashtable2 = CreateHashtable();
169  hashtable[permissionAccessPath[i]] = hashtable2;
170  hashtable = hashtable2;
171  }
172  if (hashtable.ContainsKey(permissionAccessPath[permissionAccessPath.Length - 1]))
173  {
174  throw new InvalidOperationException(SR.GetString("PermissionItemExists"));
175  }
176  hashtable[permissionAccessPath[permissionAccessPath.Length - 1]] = entry.PermissionAccess;
177  }
178 
180  protected void Clear()
181  {
182  rootTable.Clear();
183  }
184 
187  public override IPermission Copy()
188  {
189  ResourcePermissionBase resourcePermissionBase = CreateInstance();
190  resourcePermissionBase.tagNames = tagNames;
191  resourcePermissionBase.permissionAccessType = permissionAccessType;
192  resourcePermissionBase.isUnrestricted = isUnrestricted;
193  resourcePermissionBase.rootTable = CopyChildren(rootTable, 0);
194  return resourcePermissionBase;
195  }
196 
197  private Hashtable CopyChildren(object currentContent, int tagIndex)
198  {
199  IDictionaryEnumerator enumerator = ((Hashtable)currentContent).GetEnumerator();
200  Hashtable hashtable = CreateHashtable();
201  while (enumerator.MoveNext())
202  {
203  if (tagIndex < TagNames.Length - 1)
204  {
205  hashtable[enumerator.Key] = CopyChildren(enumerator.Value, tagIndex + 1);
206  }
207  else
208  {
209  hashtable[enumerator.Key] = enumerator.Value;
210  }
211  }
212  return hashtable;
213  }
214 
215  private ResourcePermissionBase CreateInstance()
216  {
217  new PermissionSet(PermissionState.Unrestricted).Assert();
218  return (ResourcePermissionBase)Activator.CreateInstance(GetType(), BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.CreateInstance, null, null, null);
219  }
220 
224  {
225  return GetChildrenAccess(rootTable, 0);
226  }
227 
228  private ResourcePermissionBaseEntry[] GetChildrenAccess(object currentContent, int tagIndex)
229  {
230  IDictionaryEnumerator enumerator = ((Hashtable)currentContent).GetEnumerator();
231  ArrayList arrayList = new ArrayList();
232  while (enumerator.MoveNext())
233  {
234  if (tagIndex < TagNames.Length - 1)
235  {
236  ResourcePermissionBaseEntry[] childrenAccess = GetChildrenAccess(enumerator.Value, tagIndex + 1);
237  for (int i = 0; i < childrenAccess.Length; i++)
238  {
239  childrenAccess[i].PermissionAccessPath[tagIndex] = (string)enumerator.Key;
240  }
241  arrayList.AddRange(childrenAccess);
242  }
243  else
244  {
245  ResourcePermissionBaseEntry resourcePermissionBaseEntry = new ResourcePermissionBaseEntry((int)enumerator.Value, new string[TagNames.Length]);
246  resourcePermissionBaseEntry.PermissionAccessPath[tagIndex] = (string)enumerator.Key;
247  arrayList.Add(resourcePermissionBaseEntry);
248  }
249  }
250  return (ResourcePermissionBaseEntry[])arrayList.ToArray(typeof(ResourcePermissionBaseEntry));
251  }
252 
257  public override void FromXml(SecurityElement securityElement)
258  {
259  if (securityElement == null)
260  {
261  throw new ArgumentNullException("securityElement");
262  }
263  if (!securityElement.Tag.Equals("Permission") && !securityElement.Tag.Equals("IPermission"))
264  {
265  throw new ArgumentException(SR.GetString("Argument_NotAPermissionElement"));
266  }
267  string text = securityElement.Attribute("version");
268  if (text != null && !text.Equals("1"))
269  {
270  throw new ArgumentException(SR.GetString("Argument_InvalidXMLBadVersion"));
271  }
272  string text2 = securityElement.Attribute("Unrestricted");
273  if (text2 != null && string.Compare(text2, "true", StringComparison.OrdinalIgnoreCase) == 0)
274  {
275  isUnrestricted = true;
276  return;
277  }
278  isUnrestricted = false;
279  rootTable = (Hashtable)ReadChildren(securityElement, 0);
280  }
281 
286  public override IPermission Intersect(IPermission target)
287  {
288  if (target == null)
289  {
290  return null;
291  }
292  if (target.GetType() != GetType())
293  {
294  throw new ArgumentException(SR.GetString("PermissionTypeMismatch"), "target");
295  }
296  ResourcePermissionBase resourcePermissionBase = (ResourcePermissionBase)target;
297  if (IsUnrestricted())
298  {
299  return resourcePermissionBase.Copy();
300  }
301  if (resourcePermissionBase.IsUnrestricted())
302  {
303  return Copy();
304  }
305  ResourcePermissionBase resourcePermissionBase2 = null;
306  Hashtable hashtable = (Hashtable)IntersectContents(rootTable, resourcePermissionBase.rootTable);
307  if (hashtable != null)
308  {
309  resourcePermissionBase2 = CreateInstance();
310  resourcePermissionBase2.rootTable = hashtable;
311  }
312  return resourcePermissionBase2;
313  }
314 
315  private object IntersectContents(object currentContent, object targetContent)
316  {
317  if (currentContent is int)
318  {
319  int num = (int)currentContent;
320  int num2 = (int)targetContent;
321  return num & num2;
322  }
323  Hashtable hashtable = CreateHashtable();
324  object obj = ((Hashtable)currentContent)["."];
325  object obj2 = ((Hashtable)currentContent)[ComputerName];
326  if (obj != null || obj2 != null)
327  {
328  object obj3 = ((Hashtable)targetContent)["."];
329  object obj4 = ((Hashtable)targetContent)[ComputerName];
330  if (obj3 != null || obj4 != null)
331  {
332  object currentContent2 = obj;
333  if (obj != null && obj2 != null)
334  {
335  currentContent2 = UnionOfContents(obj, obj2);
336  }
337  else if (obj2 != null)
338  {
339  currentContent2 = obj2;
340  }
341  object targetContent2 = obj3;
342  if (obj3 != null && obj4 != null)
343  {
344  targetContent2 = UnionOfContents(obj3, obj4);
345  }
346  else if (obj4 != null)
347  {
348  targetContent2 = obj4;
349  }
350  object value = IntersectContents(currentContent2, targetContent2);
351  if (HasContent(value))
352  {
353  if (obj2 != null || obj4 != null)
354  {
355  hashtable[ComputerName] = value;
356  }
357  else
358  {
359  hashtable["."] = value;
360  }
361  }
362  }
363  }
364  IDictionaryEnumerator enumerator;
365  Hashtable hashtable2;
366  if (((Hashtable)currentContent).Count < ((Hashtable)targetContent).Count)
367  {
368  enumerator = ((Hashtable)currentContent).GetEnumerator();
369  hashtable2 = (Hashtable)targetContent;
370  }
371  else
372  {
373  enumerator = ((Hashtable)targetContent).GetEnumerator();
374  hashtable2 = (Hashtable)currentContent;
375  }
376  while (enumerator.MoveNext())
377  {
378  string text = (string)enumerator.Key;
379  if (hashtable2.ContainsKey(text) && text != "." && text != ComputerName)
380  {
381  object value2 = enumerator.Value;
382  object targetContent3 = hashtable2[text];
383  object value3 = IntersectContents(value2, targetContent3);
384  if (HasContent(value3))
385  {
386  hashtable[text] = value3;
387  }
388  }
389  }
390  if (hashtable.Count <= 0)
391  {
392  return null;
393  }
394  return hashtable;
395  }
396 
397  private bool HasContent(object value)
398  {
399  if (value == null)
400  {
401  return false;
402  }
403  if (value is int)
404  {
405  int num = (int)value;
406  return num != 0;
407  }
408  Hashtable hashtable = (Hashtable)value;
409  IDictionaryEnumerator enumerator = hashtable.GetEnumerator();
410  while (enumerator.MoveNext())
411  {
412  if (HasContent(enumerator.Value))
413  {
414  return true;
415  }
416  }
417  return false;
418  }
419 
420  private bool IsContentSubset(object currentContent, object targetContent)
421  {
422  if (currentContent is int)
423  {
424  int num = (int)currentContent;
425  int num2 = (int)targetContent;
426  if ((num & num2) != num)
427  {
428  return false;
429  }
430  return true;
431  }
432  Hashtable hashtable = (Hashtable)currentContent;
433  Hashtable hashtable2 = (Hashtable)targetContent;
434  object obj = hashtable2["*"];
435  if (obj != null)
436  {
437  foreach (DictionaryEntry item in hashtable)
438  {
439  if (!IsContentSubset(item.Value, obj))
440  {
441  return false;
442  }
443  }
444  return true;
445  }
446  foreach (DictionaryEntry item2 in hashtable)
447  {
448  string text = (string)item2.Key;
449  if (HasContent(item2.Value) && text != "." && text != ComputerName)
450  {
451  if (!hashtable2.ContainsKey(text))
452  {
453  return false;
454  }
455  if (!IsContentSubset(item2.Value, hashtable2[text]))
456  {
457  return false;
458  }
459  }
460  }
461  object obj2 = MergeContents(hashtable["."], hashtable[ComputerName]);
462  if (obj2 != null)
463  {
464  object obj3 = MergeContents(hashtable2["."], hashtable2[ComputerName]);
465  if (obj3 != null)
466  {
467  return IsContentSubset(obj2, obj3);
468  }
469  if (!IsEmpty)
470  {
471  return false;
472  }
473  }
474  return true;
475  }
476 
477  private object MergeContents(object content1, object content2)
478  {
479  if (content1 == null)
480  {
481  if (content2 == null)
482  {
483  return null;
484  }
485  return content2;
486  }
487  if (content2 == null)
488  {
489  return content1;
490  }
491  return UnionOfContents(content1, content2);
492  }
493 
498  public override bool IsSubsetOf(IPermission target)
499  {
500  if (target == null)
501  {
502  return IsEmpty;
503  }
504  if (target.GetType() != GetType())
505  {
506  return false;
507  }
508  ResourcePermissionBase resourcePermissionBase = (ResourcePermissionBase)target;
509  if (resourcePermissionBase.IsUnrestricted())
510  {
511  return true;
512  }
513  if (IsUnrestricted())
514  {
515  return false;
516  }
517  return IsContentSubset(rootTable, resourcePermissionBase.rootTable);
518  }
519 
523  public bool IsUnrestricted()
524  {
525  return isUnrestricted;
526  }
527 
528  private object ReadChildren(SecurityElement securityElement, int tagIndex)
529  {
530  Hashtable hashtable = CreateHashtable();
531  if (securityElement.Children != null)
532  {
533  for (int i = 0; i < securityElement.Children.Count; i++)
534  {
535  SecurityElement securityElement2 = (SecurityElement)securityElement.Children[i];
536  if (!(securityElement2.Tag == TagNames[tagIndex]))
537  {
538  continue;
539  }
540  string key = securityElement2.Attribute("name");
541  if (tagIndex < TagNames.Length - 1)
542  {
543  hashtable[key] = ReadChildren(securityElement2, tagIndex + 1);
544  continue;
545  }
546  string text = securityElement2.Attribute("access");
547  int num = 0;
548  if (text != null)
549  {
550  num = (int)Enum.Parse(PermissionAccessType, text);
551  }
552  hashtable[key] = num;
553  }
554  }
555  return hashtable;
556  }
557 
563  {
564  if (entry == null)
565  {
566  throw new ArgumentNullException("entry");
567  }
568  if (entry.PermissionAccessPath.Length != TagNames.Length)
569  {
570  throw new InvalidOperationException(SR.GetString("PermissionNumberOfElements"));
571  }
572  Hashtable hashtable = rootTable;
573  string[] permissionAccessPath = entry.PermissionAccessPath;
574  int num = 0;
575  while (true)
576  {
577  if (num >= permissionAccessPath.Length)
578  {
579  return;
580  }
581  if (hashtable == null || !hashtable.ContainsKey(permissionAccessPath[num]))
582  {
583  break;
584  }
585  Hashtable hashtable2 = hashtable;
586  if (num < permissionAccessPath.Length - 1)
587  {
588  hashtable = (Hashtable)hashtable[permissionAccessPath[num]];
589  if (hashtable.Count == 1)
590  {
591  hashtable2.Remove(permissionAccessPath[num]);
592  }
593  }
594  else
595  {
596  hashtable = null;
597  hashtable2.Remove(permissionAccessPath[num]);
598  }
599  num++;
600  }
601  throw new InvalidOperationException(SR.GetString("PermissionItemDoesntExist"));
602  }
603 
606  public override SecurityElement ToXml()
607  {
608  SecurityElement securityElement = new SecurityElement("IPermission");
609  Type type = GetType();
610  securityElement.AddAttribute("class", type.FullName + ", " + type.Module.Assembly.FullName.Replace('"', '\''));
611  securityElement.AddAttribute("version", "1");
612  if (isUnrestricted)
613  {
614  securityElement.AddAttribute("Unrestricted", "true");
615  return securityElement;
616  }
617  WriteChildren(securityElement, rootTable, 0);
618  return securityElement;
619  }
620 
625  public override IPermission Union(IPermission target)
626  {
627  if (target == null)
628  {
629  return Copy();
630  }
631  if (target.GetType() != GetType())
632  {
633  throw new ArgumentException(SR.GetString("PermissionTypeMismatch"), "target");
634  }
635  ResourcePermissionBase resourcePermissionBase = (ResourcePermissionBase)target;
636  ResourcePermissionBase resourcePermissionBase2 = null;
637  if (IsUnrestricted() || resourcePermissionBase.IsUnrestricted())
638  {
639  resourcePermissionBase2 = CreateInstance();
640  resourcePermissionBase2.isUnrestricted = true;
641  }
642  else
643  {
644  Hashtable hashtable = (Hashtable)UnionOfContents(rootTable, resourcePermissionBase.rootTable);
645  if (hashtable != null)
646  {
647  resourcePermissionBase2 = CreateInstance();
648  resourcePermissionBase2.rootTable = hashtable;
649  }
650  }
651  return resourcePermissionBase2;
652  }
653 
654  private object UnionOfContents(object currentContent, object targetContent)
655  {
656  if (currentContent is int)
657  {
658  int num = (int)currentContent;
659  int num2 = (int)targetContent;
660  return num | num2;
661  }
662  Hashtable hashtable = CreateHashtable();
663  IDictionaryEnumerator enumerator = ((Hashtable)currentContent).GetEnumerator();
664  IDictionaryEnumerator enumerator2 = ((Hashtable)targetContent).GetEnumerator();
665  while (enumerator.MoveNext())
666  {
667  hashtable[(string)enumerator.Key] = enumerator.Value;
668  }
669  while (enumerator2.MoveNext())
670  {
671  if (!hashtable.ContainsKey(enumerator2.Key))
672  {
673  hashtable[enumerator2.Key] = enumerator2.Value;
674  continue;
675  }
676  object currentContent2 = hashtable[enumerator2.Key];
677  object value = enumerator2.Value;
678  hashtable[enumerator2.Key] = UnionOfContents(currentContent2, value);
679  }
680  if (hashtable.Count <= 0)
681  {
682  return null;
683  }
684  return hashtable;
685  }
686 
687  private void WriteChildren(SecurityElement currentElement, object currentContent, int tagIndex)
688  {
689  IDictionaryEnumerator enumerator = ((Hashtable)currentContent).GetEnumerator();
690  while (enumerator.MoveNext())
691  {
692  SecurityElement securityElement = new SecurityElement(TagNames[tagIndex]);
693  currentElement.AddChild(securityElement);
694  securityElement.AddAttribute("name", (string)enumerator.Key);
695  if (tagIndex < TagNames.Length - 1)
696  {
697  WriteChildren(securityElement, enumerator.Value, tagIndex + 1);
698  continue;
699  }
700  string text = null;
701  int num = (int)enumerator.Value;
702  if (PermissionAccessType != null && num != 0)
703  {
704  text = Enum.Format(PermissionAccessType, num, "g");
705  securityElement.AddAttribute("access", text);
706  }
707  }
708  }
709  }
710 }
virtual Assembly Assembly
Gets the appropriate T:System.Reflection.Assembly for this instance of T:System.Reflection....
Definition: Module.cs:133
Allows a permission to expose an unrestricted state.
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
void Clear()
Clears the permission of the added permission entries.
override bool IsSubsetOf(IPermission target)
Determines whether the current permission object is a subset of the specified permission.
bool MoveNext()
Advances the enumerator to the next element of the collection.
unsafe override string ToString()
Converts the value of this instance to a T:System.String.
abstract string FullName
Gets the fully qualified name of the type, including its namespace but not its assembly.
Definition: Type.cs:153
virtual string FullName
Gets the display name of the assembly.
Definition: Assembly.cs:49
StringComparison
Specifies the culture, case, and sort rules to be used by certain overloads of the M:System....
object Key
Gets the key of the current dictionary entry.
const string Local
Specifies the character to be used to represent a local reference.
const string Any
Specifies the character to be used to represent the any wildcard character.
virtual int Count
Gets the number of elements actually contained in the T:System.Collections.ArrayList.
Definition: ArrayList.cs:2255
BindingFlags
Specifies flags that control binding and the way in which the search for members and types is conduct...
Definition: BindingFlags.cs:10
Definition: __Canon.cs:3
override SecurityElement ToXml()
Creates and returns an XML encoding of the security object and its current state.
virtual bool ContainsKey(object key)
Determines whether the T:System.Collections.Hashtable contains a specific key.
Definition: Hashtable.cs:983
override IPermission Union(IPermission target)
Creates a permission object that combines the current permission object and the target permission obj...
string Tag
Gets or sets the tag name of an XML element.
Allows control of code access security permissions.
static object Parse(Type enumType, string value)
Converts the string representation of the name or numeric value of one or more enumerated constants t...
Definition: Enum.cs:298
string [] TagNames
Gets or sets an array of strings that identify the resource you are protecting.
int PermissionAccess
Gets an integer representation of the access level enumeration value.
SecurityAction
Specifies the security actions that can be performed using declarative security.
bool IsUnrestricted()
Gets a value indicating whether the permission is unrestricted.
Provides the base class for enumerations.
Definition: Enum.cs:14
virtual void AddRange(ICollection c)
Adds the elements of an T:System.Collections.ICollection to the end of the T:System....
Definition: ArrayList.cs:2397
Represents the XML object model for encoding security objects. This class cannot be inherited.
Represents a collection of key/value pairs that are organized based on the hash code of the key....
Definition: Hashtable.cs:17
Defines the underlying structure of all code access permissions.
ResourcePermissionBase()
Initializes a new instance of the T:System.Security.Permissions.ResourcePermissionBase class.
override IPermission Copy()
Creates and returns an identical copy of the current permission object.
Represents type declarations: class types, interface types, array types, value types,...
Definition: Type.cs:18
override void FromXml(SecurityElement securityElement)
Reconstructs a security object with a specified state from an XML encoding.
CharSet
Dictates which character set marshaled strings should use.
Definition: CharSet.cs:7
Defines methods implemented by permission types.
Definition: IPermission.cs:7
Represents a mutable string of characters. This class cannot be inherited.To browse the ....
virtual int Add(object value)
Adds an object to the end of the T:System.Collections.ArrayList.
Definition: ArrayList.cs:2381
void RemovePermissionAccess(ResourcePermissionBaseEntry entry)
Removes a permission entry from the permission.
The exception that is thrown when one of the arguments provided to a method is not valid.
int Capacity
Gets or sets the maximum number of characters that can be contained in the memory allocated by the cu...
Attribute can be applied to an enumeration.
PermissionState
Specifies whether a permission should have all or no access to resources at creation.
virtual void Remove(object key)
Removes the element with the specified key from the T:System.Collections.Hashtable.
Definition: Hashtable.cs:1349
object Value
Gets or sets the value in the key/value pair.
object Value
Gets the value of the current dictionary entry.
void AddAttribute(string name, string value)
Adds a name/value attribute to an XML element.
Defines the smallest unit of a code access security permission set.
Specifies that the class can be serialized.
Enumerates the elements of a nongeneric dictionary.
ArrayList Children
Gets or sets the array of child elements of the XML element.
Type PermissionAccessType
Gets or sets an enumeration value that describes the types of access that you are giving the resource...
static StringComparer OrdinalIgnoreCase
Gets a T:System.StringComparer object that performs a case-insensitive ordinal string comparison.
The exception that is thrown when a method call is invalid for the object's current state.
void AddPermissionAccess(ResourcePermissionBaseEntry entry)
Adds a permission entry to the permission.
object Key
Gets or sets the key in the key/value pair.
string [] PermissionAccessPath
Gets an array of strings that identify the resource you are protecting.
virtual void Clear()
Removes all elements from the T:System.Collections.Hashtable.
Definition: Hashtable.cs:924
abstract new Module Module
Gets the module (the DLL) in which the current T:System.Type is defined.
Definition: Type.cs:123
override IPermission Intersect(IPermission target)
Creates and returns a permission object that is the intersection of the current permission object and...
Defines a dictionary key/value pair that can be set or retrieved.
ResourcePermissionBase(PermissionState state)
Initializes a new instance of the T:System.Security.Permissions.ResourcePermissionBase class with the...
virtual int Count
Gets the number of key/value pairs contained in the T:System.Collections.Hashtable.
Definition: Hashtable.cs:658
Represents a string comparison operation that uses specific case and culture-based or ordinal compari...
virtual object [] ToArray()
Copies the elements of the T:System.Collections.ArrayList to a new T:System.Object array.
Definition: ArrayList.cs:3083
Implements the T:System.Collections.IList interface using an array whose size is dynamically increase...
Definition: ArrayList.cs:14
ResourcePermissionBaseEntry [] GetPermissionEntries()
Returns an array of the T:System.Security.Permissions.ResourcePermissionBaseEntry objects added to th...