Click or drag to resize
Ab4d.SharpEngine logo

ComponentBase Class

ComponentBase class is the base class for any Ab4d.SharpEngine's component and define the Id and Name properties and provide disposing of the resources.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.CoreComponentBase
    More

Namespace: Ab4d.SharpEngine.Core
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public abstract class ComponentBase : IComponentBase

The ComponentBase type exposes the following members.

Constructors
 NameDescription
Protected methodComponentBase Initializes a new instance of the ComponentBase class.
Protected methodComponentBase(String) Initializes a new instance of the ComponentBase class.
Top
Properties
 NameDescription
Public propertyId Gets a unique id of this resource. This value is get by calling GetNextId(IComponentBase) method.
Public propertyIsDisposed Gets a Boolean that specifies if this resource has been disposed.
Public propertyIsDisposing Gets a Boolean that specifies if this resource is currently being disposed (the current code is executing inside Dipose method).
Public propertyName Gets name of this resource. Name cannot be null but can an empty string.
Top
Methods
 NameDescription
Protected methodCheckAndDispose CheckAndDispose method is usually called from the Dispose method. It calls Disposing event handler, then Dispose(Boolean) method and finally Disposed event handler. It also sets IsDisposing and IsDisposed properties.
Protected methodCheckIfDisposed CheckIfDisposed method throws InvalidOperationException if this object is disposed (IsDisposed is true).
Protected methodCreateClone Clones this instance of ComponentBase with creating a shallow copy (properties are copied but referenced objects are preserved). The returned cloned objects gets a new Id.
Protected methodDispose Releases unmanaged and managed resources (when disposing is true). This method may be called only from the CheckAndDispose(Boolean) method and must not be called manually by the user.
Protected methodFinalize Releases unmanaged resources and performs other cleanup operations before this object is reclaimed by garbage collection. This may also log waring or other message type or throw an exception - this is controller by DisposeObjectFromFinalizer setting.
(Overrides ObjectFinalize)
Top
Events
 NameDescription
Public eventDisposed Occurs when this instance is fully disposed. The value of the parameter is the same the disposing parameter in the Dispose(Boolean) method.
Public eventDisposing Occurs when this instance is starting to be disposed. The value of the parameter is the same the disposing parameter in the Dispose(Boolean) method.
Top
See Also
Inheritance Hierarchy