Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
X509ExtensionCollection.cs
Go to the documentation of this file.
3
5
6public sealed class X509ExtensionCollection : ICollection, IEnumerable, IEnumerable<X509Extension>
7{
9
10 public int Count => _list.Count;
11
12 public bool IsSynchronized => false;
13
14 public object SyncRoot => this;
15
16 public X509Extension this[int index]
17 {
18 get
19 {
20 if (index < 0)
21 {
23 }
24 if (index >= _list.Count)
25 {
27 }
28 return _list[index];
29 }
30 }
31
32 public X509Extension? this[string oid]
33 {
34 get
35 {
36 string value = new Oid(oid).Value;
37 foreach (X509Extension item in _list)
38 {
39 if (string.Equals(item.Oid.Value, value, StringComparison.OrdinalIgnoreCase))
40 {
41 return item;
42 }
43 }
44 return null;
45 }
46 }
47
49 {
50 if (extension == null)
51 {
52 throw new ArgumentNullException("extension");
53 }
55 return _list.Count - 1;
56 }
57
58 public void CopyTo(X509Extension[] array, int index)
59 {
61 }
62
64 {
65 if (array == null)
66 {
67 throw new ArgumentNullException("array");
68 }
69 if (array.Rank != 1)
70 {
72 }
73 if (index < 0 || index >= array.Length)
74 {
76 }
77 if (index + Count > array.Length)
78 {
80 }
81 for (int i = 0; i < Count; i++)
82 {
83 array.SetValue(this[i], index);
84 index++;
85 }
86 }
87
89 {
90 return new X509ExtensionEnumerator(this);
91 }
92
97
102}
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
void Add(TKey key, TValue value)
static string ArgumentOutOfRange_Index
Definition SR.cs:30
static string InvalidOperation_EnumNotStarted
Definition SR.cs:46
static string Arg_RankMultiDimNotSupported
Definition SR.cs:18
static string Argument_InvalidOffLen
Definition SR.cs:22
Definition SR.cs:7
void CopyTo(T[] array, int arrayIndex)
new IEnumerator< T > GetEnumerator()