14using System.Runtime.InteropServices;
18 , global::System.Collections.Generic.IDictionary<String, OdTfDigest>
20 private Object locker =
new Object();
21 private HandleRef swigCPtr;
23 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
26 swigCPtr =
new HandleRef(
this, cPtr);
28 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
30 return (obj ==
null) ?
new HandleRef(
null, IntPtr.Zero) : obj.swigCPtr;
39 global::System.GC.SuppressFinalize(
this);
42 protected virtual void Dispose(
bool disposing) {
44 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
49 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
86 public global::System.Collections.Generic.ICollection<
String>
Keys {
88 global::System.Collections.Generic.ICollection<
String> keys =
new global::System.Collections.Generic.List<
String>();
89 int size = this.
Count;
91 global::System.IntPtr iter = create_iterator_begin();
92 for (
int i = 0; i < size; i++) {
93 keys.Add(get_next_key(iter));
95 destroy_iterator(iter);
103 global::System.Collections.Generic.ICollection<
OdTfDigest> vals =
new global::System.Collections.Generic.List<
OdTfDigest>();
104 foreach (global::System.Collections.Generic.KeyValuePair<
String,
OdTfDigest> pair in
this) {
105 vals.Add(pair.Value);
112 Add(item.Key, item.Value);
124 if (
this[item.Key] == item.Value) {
137 throw new global::System.ArgumentNullException(
"array");
139 throw new global::System.ArgumentOutOfRangeException(
"arrayIndex",
"Value is less than zero");
141 throw new global::System.ArgumentException(
"Multi dimensional array.",
"array");
142 if (arrayIndex+this.
Count > array.Length)
143 throw new global::System.ArgumentException(
"Number of elements to copy is too large.");
145 global::System.Collections.Generic.IList<
String> keyList =
new global::System.Collections.Generic.List<
String>(this.
Keys);
146 for (
int i = 0; i < keyList.Count; i++) {
147 String currentKey = keyList[i];
148 array.SetValue(
new global::System.Collections.Generic.KeyValuePair<
String,
OdTfDigest>(currentKey,
this[currentKey]), arrayIndex+i);
152 global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<
String,
OdTfDigest>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<
String,
OdTfDigest>>.GetEnumerator() {
153 return new OdTfDigestMapEnumerator(
this);
156 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
157 return new OdTfDigestMapEnumerator(
this);
170 global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<String, OdTfDigest>>
173 private global::System.Collections.Generic.IList<
String> keyCollection;
174 private int currentIndex;
175 private object currentObject;
176 private int currentSize;
179 collectionRef = collection;
180 keyCollection =
new global::System.Collections.Generic.List<
String>(collection.
Keys);
182 currentObject =
null;
183 currentSize = collectionRef.
Count;
189 if (currentIndex == -1)
190 throw new global::System.InvalidOperationException(
"Enumeration not started.");
191 if (currentIndex > currentSize - 1)
192 throw new global::System.InvalidOperationException(
"Enumeration finished.");
193 if (currentObject ==
null)
194 throw new global::System.InvalidOperationException(
"Collection modified.");
195 return (global::System.Collections.Generic.KeyValuePair<
String,
OdTfDigest>)currentObject;
200 object global::System.Collections.IEnumerator.Current {
207 int size = collectionRef.
Count;
208 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
211 String currentKey = keyCollection[currentIndex];
212 currentObject =
new global::System.Collections.Generic.KeyValuePair<
String,
OdTfDigest>(currentKey, collectionRef[currentKey]);
214 currentObject =
null;
221 currentObject =
null;
222 if (collectionRef.
Count != currentSize) {
223 throw new global::System.InvalidOperationException(
"Collection modified.");
229 currentObject =
null;
242 private uint size() {
265 private void setitem(
String key, OdTfDigest x) {
266 TD_DbPINVOKE.OdTfDigestMap_setitem(swigCPtr, key, OdTfDigest.getCPtr(x));
267 if (TD_DbPINVOKE.SWIGPendingException.Pending)
throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
287 private global::System.IntPtr create_iterator_begin() {
293 private String get_next_key(global::System.IntPtr swigiterator) {
294 string ret = TD_DbPINVOKE.OdTfDigestMap_get_next_key(swigCPtr, swigiterator);
295 if (TD_DbPINVOKE.SWIGPendingException.Pending)
throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
299 private void destroy_iterator(global::System.IntPtr swigiterator) {
300 TD_DbPINVOKE.OdTfDigestMap_destroy_iterator(swigCPtr, swigiterator);
301 if (TD_DbPINVOKE.SWIGPendingException.Pending)
throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
static HandleRef getCPtr(OdTfDigest obj)
global::System.Collections.Generic.KeyValuePair< String, OdTfDigest > Current
OdTfDigestMapEnumerator(OdTfDigestMap collection)
bool ContainsKey(String key)
virtual void Dispose(bool disposing)
bool Contains(global::System.Collections.Generic.KeyValuePair< String, OdTfDigest > item)
bool TryGetValue(String key, out OdTfDigest value)
OdTfDigestMap(IntPtr cPtr, bool cMemoryOwn)
global::System.Collections.Generic.ICollection< String > Keys
void Add(String key, OdTfDigest value)
void Add(global::System.Collections.Generic.KeyValuePair< String, OdTfDigest > item)
static HandleRef getCPtr(OdTfDigestMap obj)
void CopyTo(global::System.Collections.Generic.KeyValuePair< String, OdTfDigest >[] array)
OdTfDigestMapEnumerator GetEnumerator()
bool Remove(global::System.Collections.Generic.KeyValuePair< String, OdTfDigest > item)
OdTfDigestMap(OdTfDigestMap other)
global::System.Collections.Generic.ICollection< OdTfDigest > Values
void CopyTo(global::System.Collections.Generic.KeyValuePair< String, OdTfDigest >[] array, int arrayIndex)
static global::System.Exception Retrieve()
static void delete_OdTfDigestMap(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdTfDigestMap_Remove(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2)
static void OdTfDigestMap_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
static global::System.IntPtr OdTfDigestMap_create_iterator_begin(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool OdTfDigestMap_empty(global::System.Runtime.InteropServices.HandleRef jarg1)
static void OdTfDigestMap_Add(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2, global::System.Runtime.InteropServices.HandleRef jarg3)
static global::System.IntPtr OdTfDigestMap_getitem(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2)
static bool OdTfDigestMap_ContainsKey(global::System.Runtime.InteropServices.HandleRef jarg1, [MarshalAs(UnmanagedType.LPWStr)]String jarg2)
static uint OdTfDigestMap_size(global::System.Runtime.InteropServices.HandleRef jarg1)