/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public class ItemContainer : global::System.IDisposable, global::System.Collections.IEnumerable
- , global::System.Collections.Generic.IEnumerable<Item>
+ public class ItemContainer : Disposable, global::System.Collections.IEnumerable,
+ global::System.Collections.Generic.IEnumerable<Item>
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
}
- /// <summary>A Flag to check who called Dispose(). (By User or DisposeQueue)</summary>
- private bool isDisposeQueued = false;
-
- /// <summary>A Flag to check if it is already disposed.</summary>
- /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
- protected bool disposed = false;
-
- /// <summary>Destructor.</summary>
- /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
- ~ItemContainer()
- {
- if (!isDisposeQueued)
- {
- isDisposeQueued = true;
- DisposeQueue.Instance.Add(this);
- }
- }
-
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public void Dispose()
- {
- //Throw excpetion if Dispose() is called in separate thread.
- if (!Window.IsInstalled())
- {
- throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
- }
-
- if (isDisposeQueued)
- {
- Dispose(DisposeTypes.Implicit);
- }
- else
- {
- Dispose(DisposeTypes.Explicit);
- System.GC.SuppressFinalize(this);
- }
- }
-
- /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- protected virtual void Dispose(DisposeTypes type)
+ protected override void Dispose(DisposeTypes type)
{
if (disposed)
{
return;
}
- if (type == DisposeTypes.Explicit)
- {
- //Called by User
- //Release your own managed resources here.
- //You should release all of your own disposable objects here.
-
- }
-
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
}
- disposed = true;
+ base.Dispose(type);
}
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
/// tricky to detect unmanaged code that modifies the collection under our feet.
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class ItemContainerEnumerator : global::System.Collections.IEnumerator
- , global::System.Collections.Generic.IEnumerator<Item>
+ public sealed class ItemContainerEnumerator : global::System.Collections.IEnumerator,
+ global::System.Collections.Generic.IEnumerator<Item>
{
private ItemContainer collectionRef;
private int currentIndex;
Interop.ItemContainer.ItemContainer_SetRange(swigCPtr, index, ItemContainer.getCPtr(values));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
-
}
-
}