Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
UDictionary< TKey, TValue > Class Template Reference
Inheritance diagram for UDictionary< TKey, TValue >:

Public Member Functions

 UDictionary ()
 
 UDictionary (IEqualityComparer< TKey > comparer)
 
 UDictionary (IDictionary< TKey, TValue > dictionary)
 
 UDictionary (int capacity)
 
 UDictionary (IDictionary< TKey, TValue > dictionary, IEqualityComparer< TKey > comparer)
 
 UDictionary (int capacity, IEqualityComparer< TKey > comparer)
 
void OnAfterDeserialize ()
 
void OnBeforeSerialize ()
 
void GetObjectData (SerializationInfo info, StreamingContext context)
 
void OnDeserialization (object sender)
 
void Add (TKey key, TValue value)
 
bool ContainsKey (TKey key)
 
bool Remove (TKey key)
 
bool TryGetValue (TKey key, out TValue value)
 
void Add (KeyValuePair< TKey, TValue > item)
 
void Clear ()
 
bool Contains (KeyValuePair< TKey, TValue > item)
 
bool Remove (KeyValuePair< TKey, TValue > item)
 
IEnumerator< KeyValuePair< TKey, TValue > > GetEnumerator ()
 

Properties

bool IsFixedSize [get]
 
ICollection< TKey > Keys [get]
 
ICollection IDictionary. Keys [get]
 
ICollection< TValue > Values [get]
 
ICollection IDictionary. Values [get]
 
TValue this[TKey key] [get, set]
 
object IDictionary. this[object key] [get, set]
 
int Count [get]
 
bool IsReadOnly [get]
 
bool IsSynchronized [get]
 
object SyncRoot [get]
 

Private Member Functions

void IDictionary. Add (object key, object value)
 
bool IDictionary. Contains (object key)
 
void IDictionary. Remove (object key)
 
IDictionaryEnumerator IDictionary. GetEnumerator ()
 
void ICollection. CopyTo (Array array, int index)
 
void ICollection< KeyValuePair< TKey, TValue > >. CopyTo (KeyValuePair< TKey, TValue >[] array, int arrayIndex)
 
IEnumerator IEnumerable. GetEnumerator ()
 

Private Attributes

List< TKey > keys = new List<TKey>()
 
List< TValue > values = new List<TValue>()
 
Dictionary< TKey, TValue > dictionary
 

Detailed Description

Definition at line 12 of file UDictionary.cs.

Constructor & Destructor Documentation

◆ UDictionary() [1/6]

UDictionary< TKey, TValue >.UDictionary ( )
inline

Definition at line 72 of file UDictionary.cs.

73 {
74 dictionary = new Dictionary<TKey, TValue>();
75 }
Dictionary< TKey, TValue > dictionary
Definition: UDictionary.cs:21

References UDictionary< TKey, TValue >.dictionary.

◆ UDictionary() [2/6]

UDictionary< TKey, TValue >.UDictionary ( IEqualityComparer< TKey >  comparer)
inline

Definition at line 77 of file UDictionary.cs.

78 {
79 dictionary = new Dictionary<TKey, TValue>(comparer);
80 }

References UDictionary< TKey, TValue >.dictionary.

◆ UDictionary() [3/6]

UDictionary< TKey, TValue >.UDictionary ( IDictionary< TKey, TValue >  dictionary)
inline

Definition at line 82 of file UDictionary.cs.

83 {
84 this.dictionary = new Dictionary<TKey, TValue>(dictionary);
85 }

References UDictionary< TKey, TValue >.dictionary.

◆ UDictionary() [4/6]

UDictionary< TKey, TValue >.UDictionary ( int  capacity)
inline

Definition at line 87 of file UDictionary.cs.

88 {
89 dictionary = new Dictionary<TKey, TValue>(capacity);
90 }

References UDictionary< TKey, TValue >.dictionary.

◆ UDictionary() [5/6]

UDictionary< TKey, TValue >.UDictionary ( IDictionary< TKey, TValue >  dictionary,
IEqualityComparer< TKey >  comparer 
)
inline

Definition at line 92 of file UDictionary.cs.

93 {
94 this.dictionary = new Dictionary<TKey, TValue>(dictionary, comparer);
95 }

References UDictionary< TKey, TValue >.dictionary.

◆ UDictionary() [6/6]

UDictionary< TKey, TValue >.UDictionary ( int  capacity,
IEqualityComparer< TKey >  comparer 
)
inline

Definition at line 97 of file UDictionary.cs.

98 {
99 dictionary = new Dictionary<TKey, TValue>(capacity, comparer);
100 }

References UDictionary< TKey, TValue >.dictionary.

Member Function Documentation

◆ Add() [1/3]

void UDictionary< TKey, TValue >.Add ( KeyValuePair< TKey, TValue >  item)
inline

Definition at line 188 of file UDictionary.cs.

189 {
190 dictionary.Add(item.Key, item.Value);
191 }

References UDictionary< TKey, TValue >.dictionary, and item.

◆ Add() [2/3]

void IDictionary. UDictionary< TKey, TValue >.Add ( object  key,
object  value 
)
inlineprivate

Definition at line 143 of file UDictionary.cs.

144 {
145 if (key is TKey && (value is TValue || value == null))
146 {
147 dictionary.Add((TKey)key, (TValue)value);
148 }
149 }

References UDictionary< TKey, TValue >.dictionary.

◆ Add() [3/3]

void UDictionary< TKey, TValue >.Add ( TKey  key,
TValue  value 
)
inline

Definition at line 138 of file UDictionary.cs.

139 {
140 dictionary.Add(key, value);
141 }

References UDictionary< TKey, TValue >.dictionary.

Referenced by CoreRef.RebuildBiomeList().

◆ Clear()

void UDictionary< TKey, TValue >.Clear ( )
inline

Definition at line 193 of file UDictionary.cs.

194 {
195 dictionary.Clear();
196 }

References UDictionary< TKey, TValue >.dictionary.

Referenced by CoreRef.RebuildBiomeList(), and CoreRef.RebuildSketchList().

◆ Contains() [1/2]

bool UDictionary< TKey, TValue >.Contains ( KeyValuePair< TKey, TValue >  item)
inline

Definition at line 198 of file UDictionary.cs.

199 {
200 if (dictionary.ContainsKey(item.Key))
201 {
202 return dictionary[item.Key].Equals(item.Value);
203 }
204 return false;
205 }

References UDictionary< TKey, TValue >.dictionary, and item.

◆ Contains() [2/2]

bool IDictionary. UDictionary< TKey, TValue >.Contains ( object  key)
inlineprivate

Definition at line 156 of file UDictionary.cs.

157 {
158 if (!(key is TKey))
159 {
160 return false;
161 }
162 return dictionary.ContainsKey((TKey)key);
163 }

References UDictionary< TKey, TValue >.dictionary.

◆ ContainsKey()

bool UDictionary< TKey, TValue >.ContainsKey ( TKey  key)
inline

Definition at line 151 of file UDictionary.cs.

152 {
153 return dictionary.ContainsKey(key);
154 }

References UDictionary< TKey, TValue >.dictionary.

Referenced by ActEffect.DamageEle(), and SourceThingV.RestorePref().

◆ CopyTo() [1/2]

void ICollection. UDictionary< TKey, TValue >.CopyTo ( Array  array,
int  index 
)
inlineprivate

Definition at line 207 of file UDictionary.cs.

208 {
209 }

◆ CopyTo() [2/2]

void ICollection< KeyValuePair< TKey, TValue > >. UDictionary< TKey, TValue >.CopyTo ( KeyValuePair< TKey, TValue >[]  array,
int  arrayIndex 
)
inlineprivate

Definition at line 211 of file UDictionary.cs.

212 {
213 }

◆ GetEnumerator() [1/3]

IDictionaryEnumerator IDictionary. UDictionary< TKey, TValue >.GetEnumerator ( )
inlineprivate

Definition at line 183 of file UDictionary.cs.

184 {
185 return ((IDictionary)dictionary).GetEnumerator();
186 }

References UDictionary< TKey, TValue >.dictionary.

◆ GetEnumerator() [2/3]

IEnumerator< KeyValuePair< TKey, TValue > > UDictionary< TKey, TValue >.GetEnumerator ( )
inline

Definition at line 220 of file UDictionary.cs.

221 {
222 return dictionary.GetEnumerator();
223 }

References UDictionary< TKey, TValue >.dictionary.

◆ GetEnumerator() [3/3]

IEnumerator IEnumerable. UDictionary< TKey, TValue >.GetEnumerator ( )
inlineprivate

Definition at line 225 of file UDictionary.cs.

226 {
227 return dictionary.GetEnumerator();
228 }

References UDictionary< TKey, TValue >.dictionary.

◆ GetObjectData()

void UDictionary< TKey, TValue >.GetObjectData ( SerializationInfo  info,
StreamingContext  context 
)
inline

Definition at line 128 of file UDictionary.cs.

129 {
130 dictionary.GetObjectData(info, context);
131 }

References UDictionary< TKey, TValue >.dictionary.

◆ OnAfterDeserialize()

void UDictionary< TKey, TValue >.OnAfterDeserialize ( )
inline

Definition at line 102 of file UDictionary.cs.

103 {
104 dictionary.Clear();
105 for (int i = 0; i < keys.Count; i++)
106 {
107 if (keys[i] != null && (!(keys[i] is UnityEngine.Object) || (bool)(UnityEngine.Object)(object)keys[i]))
108 {
109 dictionary.Add(keys[i], values[i]);
110 }
111 }
112 }
List< TValue > values
Definition: UDictionary.cs:18
List< TKey > keys
Definition: UDictionary.cs:15

References UDictionary< TKey, TValue >.dictionary, UDictionary< TKey, TValue >.keys, and UDictionary< TKey, TValue >.values.

◆ OnBeforeSerialize()

void UDictionary< TKey, TValue >.OnBeforeSerialize ( )
inline

Definition at line 114 of file UDictionary.cs.

115 {
116 keys.Clear();
117 values.Clear();
118 foreach (KeyValuePair<TKey, TValue> item in dictionary)
119 {
120 if (item.Key != null && (!(item.Key is UnityEngine.Object) || (bool)(UnityEngine.Object)(object)item.Key))
121 {
122 keys.Add(item.Key);
123 values.Add(item.Value);
124 }
125 }
126 }

References UDictionary< TKey, TValue >.dictionary, item, UDictionary< TKey, TValue >.keys, and UDictionary< TKey, TValue >.values.

◆ OnDeserialization()

void UDictionary< TKey, TValue >.OnDeserialization ( object  sender)
inline

Definition at line 133 of file UDictionary.cs.

134 {
135 dictionary.OnDeserialization(sender);
136 }

References UDictionary< TKey, TValue >.dictionary.

◆ Remove() [1/3]

bool UDictionary< TKey, TValue >.Remove ( KeyValuePair< TKey, TValue >  item)
inline

Definition at line 215 of file UDictionary.cs.

216 {
217 return dictionary.Remove(item.Key);
218 }

References UDictionary< TKey, TValue >.dictionary, and item.

◆ Remove() [2/3]

void IDictionary. UDictionary< TKey, TValue >.Remove ( object  key)
inlineprivate

Definition at line 170 of file UDictionary.cs.

171 {
172 if (key is TKey)
173 {
174 dictionary.Remove((TKey)key);
175 }
176 }

References UDictionary< TKey, TValue >.dictionary.

◆ Remove() [3/3]

bool UDictionary< TKey, TValue >.Remove ( TKey  key)
inline

Definition at line 165 of file UDictionary.cs.

166 {
167 return dictionary.Remove(key);
168 }

References UDictionary< TKey, TValue >.dictionary.

◆ TryGetValue()

bool UDictionary< TKey, TValue >.TryGetValue ( TKey  key,
out TValue  value 
)
inline

Member Data Documentation

◆ dictionary

◆ keys

List<TKey> UDictionary< TKey, TValue >.keys = new List<TKey>()
private

◆ values

List<TValue> UDictionary< TKey, TValue >.values = new List<TValue>()
private

Property Documentation

◆ Count

int UDictionary< TKey, TValue >.Count
get

Definition at line 64 of file UDictionary.cs.

Referenced by CoreRef.RebuildSketchList(), and ContentGallery.Refresh().

◆ IsFixedSize

bool UDictionary< TKey, TValue >.IsFixedSize
get

Definition at line 23 of file UDictionary.cs.

◆ IsReadOnly

bool UDictionary< TKey, TValue >.IsReadOnly
get

Definition at line 66 of file UDictionary.cs.

◆ IsSynchronized

bool UDictionary< TKey, TValue >.IsSynchronized
get

Definition at line 68 of file UDictionary.cs.

◆ Keys [1/2]

ICollection<TKey> UDictionary< TKey, TValue >.Keys
get

◆ Keys [2/2]

ICollection IDictionary. UDictionary< TKey, TValue >.Keys
getprivate

Definition at line 27 of file UDictionary.cs.

◆ SyncRoot

object UDictionary< TKey, TValue >.SyncRoot
get

Definition at line 70 of file UDictionary.cs.

◆ this[object key]

object IDictionary. UDictionary< TKey, TValue >.this[object key]
getsetprivate

Definition at line 45 of file UDictionary.cs.

46 {
47 get
48 {
49 if (!(key is TKey))
50 {
51 return null;
52 }
53 return dictionary[(TKey)key];
54 }
55 set
56 {
57 if (key is TKey && (value is TValue || value == null))
58 {
59 dictionary[(TKey)key] = (TValue)value;
60 }
61 }
62 }

◆ this[TKey key]

TValue UDictionary< TKey, TValue >.this[TKey key]
getset

Definition at line 33 of file UDictionary.cs.

34 {
35 get
36 {
37 return dictionary[key];
38 }
39 set
40 {
41 dictionary[key] = value;
42 }
43 }

◆ Values [1/2]

ICollection<TValue> UDictionary< TKey, TValue >.Values
get

Definition at line 29 of file UDictionary.cs.

Referenced by BiomeProfile.Init().

◆ Values [2/2]

ICollection IDictionary. UDictionary< TKey, TValue >.Values
getprivate

Definition at line 31 of file UDictionary.cs.


The documentation for this class was generated from the following file: