ScriptStack 1.0.5
Loading...
Searching...
No Matches
ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue > Class Template Reference
Inheritance diagram for ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >:

Public Member Functions

 ReadOnlyDictionary (IDictionary< TKey, TValue > dictionaryToWrap)
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)
void CopyTo (KeyValuePair< TKey, TValue >[] array, int arrayIndex)
bool Remove (KeyValuePair< TKey, TValue > item)
IEnumerator< KeyValuePair< TKey, TValue > > GetEnumerator ()
void Add (object key, object value)
bool Contains (object key)
void Remove (object key)
void CopyTo (Array array, int index)
void OnDeserialization (object sender)
void GetObjectData (SerializationInfo info, StreamingContext context)

Static Public Member Functions

static ReadOnlyDictionary< TKey, TValue > AsReadOnly (IDictionary< TKey, TValue > dictionaryToWrap)

Properties

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

Private Member Functions

IEnumerator IEnumerable. GetEnumerator ()
IDictionaryEnumerator IDictionary. GetEnumerator ()

Private Attributes

IDictionary< TKey, TValue > m_dictionaryTyped
IDictionary m_dictionary

Detailed Description

Definition at line 10 of file ReadOnlyDictionary.cs.

Member Function Documentation

◆ Add() [1/3]

void ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Add ( KeyValuePair< TKey, TValue > item)

Definition at line 81 of file ReadOnlyDictionary.cs.

82 {
83 }

◆ Add() [2/3]

void ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Add ( object key,
object value )

Definition at line 103 of file ReadOnlyDictionary.cs.

104 {
105 }

◆ Add() [3/3]

void ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Add ( TKey key,
TValue value )

Definition at line 66 of file ReadOnlyDictionary.cs.

67 {
68 }

◆ AsReadOnly()

ReadOnlyDictionary< TKey, TValue > ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.AsReadOnly ( IDictionary< TKey, TValue > dictionaryToWrap)
static

Definition at line 62 of file ReadOnlyDictionary.cs.

63 {
64 return new ReadOnlyDictionary<TKey, TValue>(dictionaryToWrap);
65 }

References ReadOnlyDictionary().

◆ Clear()

void ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Clear ( )

Definition at line 84 of file ReadOnlyDictionary.cs.

85 {
86 }

◆ Contains() [1/2]

bool ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Contains ( KeyValuePair< TKey, TValue > item)

Definition at line 87 of file ReadOnlyDictionary.cs.

88 {
89 return m_dictionaryTyped.Contains(item);
90 }

References m_dictionaryTyped.

◆ Contains() [2/2]

bool ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Contains ( object key)

Definition at line 106 of file ReadOnlyDictionary.cs.

107 {
108 return m_dictionary.Contains(key);
109 }

References m_dictionary.

◆ ContainsKey()

bool ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.ContainsKey ( TKey key)

Definition at line 69 of file ReadOnlyDictionary.cs.

70 {
71 return m_dictionaryTyped.ContainsKey(key);
72 }

References m_dictionaryTyped.

◆ CopyTo() [1/2]

void ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.CopyTo ( Array array,
int index )

Definition at line 123 of file ReadOnlyDictionary.cs.

124 {
125 }

◆ CopyTo() [2/2]

void ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.CopyTo ( KeyValuePair< TKey, TValue >[] array,
int arrayIndex )

Definition at line 91 of file ReadOnlyDictionary.cs.

92 {
93 m_dictionaryTyped.CopyTo(array, arrayIndex);
94 }

References m_dictionaryTyped.

◆ GetEnumerator() [1/3]

IEnumerator< KeyValuePair< TKey, TValue > > ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.GetEnumerator ( )

Definition at line 99 of file ReadOnlyDictionary.cs.

100 {
101 return m_dictionaryTyped.GetEnumerator();
102 }

References m_dictionaryTyped.

◆ GetEnumerator() [2/3]

IDictionaryEnumerator IDictionary. ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.GetEnumerator ( )
private

Definition at line 31 of file ReadOnlyDictionary.cs.

32 {
33 return m_dictionary.GetEnumerator();
34 }

References m_dictionary.

◆ GetEnumerator() [3/3]

IEnumerator IEnumerable. ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.GetEnumerator ( )
private

Definition at line 27 of file ReadOnlyDictionary.cs.

28 {
29 return m_dictionary.GetEnumerator();
30 }

References m_dictionary.

◆ GetObjectData()

void ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.GetObjectData ( SerializationInfo info,
StreamingContext context )

Definition at line 131 of file ReadOnlyDictionary.cs.

132 {
133 ISerializable serializable = m_dictionaryTyped as ISerializable;
134 serializable.GetObjectData(info, context);
135 }

References m_dictionaryTyped.

◆ OnDeserialization()

void ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.OnDeserialization ( object sender)

Definition at line 126 of file ReadOnlyDictionary.cs.

127 {
128 IDeserializationCallback callback = m_dictionaryTyped as IDeserializationCallback;
129 callback.OnDeserialization(sender);
130 }

References m_dictionaryTyped.

◆ ReadOnlyDictionary()

ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.ReadOnlyDictionary ( IDictionary< TKey, TValue > dictionaryToWrap)

Definition at line 57 of file ReadOnlyDictionary.cs.

58 {
59 m_dictionaryTyped = dictionaryToWrap;
60 m_dictionary = (IDictionary)m_dictionaryTyped;
61 }

References m_dictionary, and m_dictionaryTyped.

Referenced by AsReadOnly().

◆ Remove() [1/3]

bool ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Remove ( KeyValuePair< TKey, TValue > item)

Definition at line 95 of file ReadOnlyDictionary.cs.

96 {
97 return false;
98 }

◆ Remove() [2/3]

void ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Remove ( object key)

Definition at line 110 of file ReadOnlyDictionary.cs.

111 {
112 }

◆ Remove() [3/3]

bool ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Remove ( TKey key)

Definition at line 73 of file ReadOnlyDictionary.cs.

74 {
75 return false;
76 }

◆ TryGetValue()

bool ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.TryGetValue ( TKey key,
out TValue value )

Definition at line 77 of file ReadOnlyDictionary.cs.

78 {
79 return m_dictionaryTyped.TryGetValue(key, out value);
80 }

References m_dictionaryTyped.

Member Data Documentation

◆ m_dictionary

IDictionary ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.m_dictionary
private

Definition at line 22 of file ReadOnlyDictionary.cs.

Referenced by Contains(), GetEnumerator(), and ReadOnlyDictionary().

◆ m_dictionaryTyped

IDictionary<TKey, TValue> ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.m_dictionaryTyped
private

Property Documentation

◆ Count

int ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Count
get

Definition at line 154 of file ReadOnlyDictionary.cs.

155 {
156 get
157 {
158 return m_dictionaryTyped.Count;
159 }
160 }

◆ IsFixedSize

bool ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.IsFixedSize
get

Definition at line 178 of file ReadOnlyDictionary.cs.

179 {
180 get
181 {
182 return m_dictionary.IsFixedSize;
183 }
184 }

◆ IsReadOnly

bool ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.IsReadOnly
get

Definition at line 161 of file ReadOnlyDictionary.cs.

162 {
163 get
164 {
165 return true;
166 }
167 }

◆ IsSynchronized

bool ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.IsSynchronized
get

Definition at line 185 of file ReadOnlyDictionary.cs.

186 {
187 get
188 {
189 return m_dictionary.IsSynchronized;
190 }
191 }

◆ Keys [1/2]

ICollection<TKey> ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Keys
get

Definition at line 140 of file ReadOnlyDictionary.cs.

141 {
142 get
143 {
144 return ReadOnlyICollection<TKey>.AsReadOnly(m_dictionaryTyped.Keys);
145 }
146 }

◆ Keys [2/2]

ICollection IDictionary. ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Keys
getprivate

Definition at line 39 of file ReadOnlyDictionary.cs.

40 {
41 get
42 {
43 return m_dictionary.Keys;
44 }
45 }

◆ SyncRoot

object ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.SyncRoot
get

Definition at line 192 of file ReadOnlyDictionary.cs.

193 {
194 get
195 {
196 return m_dictionary.SyncRoot;
197 }
198 }

◆ this[object key]

object ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.this[object key]
getset

Definition at line 113 of file ReadOnlyDictionary.cs.

114 {
115 get
116 {
117 return m_dictionary[key];
118 }
119 set
120 {
121 }
122 }

◆ this[TKey key]

TValue ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.this[TKey key]
getset

Definition at line 168 of file ReadOnlyDictionary.cs.

169 {
170 get
171 {
172 return m_dictionaryTyped[key];
173 }
174 set
175 {
176 }
177 }

◆ Values [1/2]

ICollection<TValue> ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Values
get

Definition at line 147 of file ReadOnlyDictionary.cs.

148 {
149 get
150 {
151 return ReadOnlyICollection<TValue>.AsReadOnly(m_dictionaryTyped.Values);
152 }
153 }

◆ Values [2/2]

ICollection IDictionary. ScriptStack.Collections.ReadOnlyDictionary< TKey, TValue >.Values
getprivate

Definition at line 46 of file ReadOnlyDictionary.cs.

47 {
48 get
49 {
50 return m_dictionary.Values;
51 }
52 }

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