14using System.Runtime.InteropServices;
18 , global::System.Collections.Generic.IDictionary<OdDbHandle, ChangeType>
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);
88 global::System.Collections.Generic.ICollection<
OdDbHandle> keys =
new global::System.Collections.Generic.List<
OdDbHandle>();
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<
ChangeType> vals =
new global::System.Collections.Generic.List<
ChangeType>();
104 foreach (global::System.Collections.Generic.KeyValuePair<
OdDbHandle,
ChangeType> 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<
OdDbHandle> keyList =
new global::System.Collections.Generic.List<
OdDbHandle>(this.
Keys);
146 for (
int i = 0; i < keyList.Count; i++) {
148 array.SetValue(
new global::System.Collections.Generic.KeyValuePair<
OdDbHandle,
ChangeType>(currentKey,
this[currentKey]), arrayIndex+i);
152 global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<
OdDbHandle,
ChangeType>> global::System.Collections.Generic.IEnumerable<global::System.Collections.Generic.KeyValuePair<
OdDbHandle,
ChangeType>>.GetEnumerator() {
153 return new ChangeListEnumerator(
this);
156 global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator() {
157 return new ChangeListEnumerator(
this);
170 global::System.Collections.Generic.IEnumerator<global::System.Collections.Generic.KeyValuePair<OdDbHandle, ChangeType>>
173 private global::System.Collections.Generic.IList<
OdDbHandle> keyCollection;
174 private int currentIndex;
175 private object currentObject;
176 private int currentSize;
179 collectionRef = collection;
180 keyCollection =
new global::System.Collections.Generic.List<
OdDbHandle>(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.");
200 object global::System.Collections.IEnumerator.Current {
207 int size = collectionRef.
Count;
208 bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
211 OdDbHandle currentKey = keyCollection[currentIndex];
212 currentObject =
new global::System.Collections.Generic.KeyValuePair<
OdDbHandle,
ChangeType>(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 UInt32 size() {
269 if (TD_DbPINVOKE.SWIGPendingException.Pending)
throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
289 private global::System.IntPtr create_iterator_begin() {
295 private OdDbHandle get_next_key(global::System.IntPtr swigiterator) {
296 OdDbHandle ret =
new OdDbHandle(TD_DbPINVOKE.ChangeList_get_next_key(swigCPtr, swigiterator),
false);
297 if (TD_DbPINVOKE.SWIGPendingException.Pending)
throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
301 private void destroy_iterator(global::System.IntPtr swigiterator) {
302 TD_DbPINVOKE.ChangeList_destroy_iterator(swigCPtr, swigiterator);
303 if (TD_DbPINVOKE.SWIGPendingException.Pending)
throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
static HandleRef getCPtr(OdDbHandle obj)
OdDbHandle Add(Int64 value)
global::System.Collections.Generic.KeyValuePair< OdDbHandle, ChangeType > Current
ChangeListEnumerator(ChangeList collection)
ChangeList(IntPtr cPtr, bool cMemoryOwn)
void CopyTo(global::System.Collections.Generic.KeyValuePair< OdDbHandle, ChangeType >[] array, int arrayIndex)
bool TryGetValue(OdDbHandle key, out ChangeType value)
ChangeList(ChangeList other)
void CopyTo(global::System.Collections.Generic.KeyValuePair< OdDbHandle, ChangeType >[] array)
bool ContainsKey(OdDbHandle key)
bool Remove(OdDbHandle key)
global::System.Collections.Generic.ICollection< ChangeType > Values
bool Remove(global::System.Collections.Generic.KeyValuePair< OdDbHandle, ChangeType > item)
static HandleRef getCPtr(ChangeList obj)
void Add(global::System.Collections.Generic.KeyValuePair< OdDbHandle, ChangeType > item)
virtual void Dispose(bool disposing)
global::System.Collections.Generic.ICollection< OdDbHandle > Keys
void Add(OdDbHandle key, ChangeType value)
bool Contains(global::System.Collections.Generic.KeyValuePair< OdDbHandle, ChangeType > item)
ChangeListEnumerator GetEnumerator()
static global::System.Exception Retrieve()
static bool ChangeList_ContainsKey(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static global::System.IntPtr ChangeList_create_iterator_begin(global::System.Runtime.InteropServices.HandleRef jarg1)
static UInt32 ChangeList_size(global::System.Runtime.InteropServices.HandleRef jarg1)
static void ChangeList_Clear(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool ChangeList_empty(global::System.Runtime.InteropServices.HandleRef jarg1)
static void ChangeList_Add(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3)
static void delete_ChangeList(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool ChangeList_Remove(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)
static int ChangeList_getitem(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2)