Class DisposeBase
This base class tries to correctly implement disposable, and should help make the behaviors
more consistent across classes that inherit from this class.
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Components.Layers
Assembly: Mars.Components.dll
Syntax
public abstract class DisposeBase : IDisposable
Properties
IsDisposed
Gets or sets a value indicating whether this instance has already had the Dispose() method called on
it.
Declaration
public bool IsDisposed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
Dispose()
Disposes
Declaration
public void Dispose()
Dispose(Boolean)
This is where the meat of the dispose work is done. Subclasses should call dispose on any disposable
members or internal members (presuming they are not dispose locked).
Declaration
protected virtual void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | True if the "Dispose" method was called instead of the destructor. |
Finalize()
Finalizes an instance of the DisposeBase class.
Declaration
protected void Finalize()
Implements
System.IDisposable