Class CommonObject
This is the base class for all Implementation's classes.
Inheritance
Namespace: Syncfusion.XlsIO.Implementation
Assembly: Syncfusion.XlsIO.Portable.dll
Syntax
public class CommonObject : Object, IParentApplication, IDisposable
Constructors
CommonObject(IApplication, Object)
Main class constructor. Application and Parent properties are set.
Declaration
public CommonObject(IApplication application, object parent)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Reference to Application instance. |
System.Object | parent | Reference to the Parent object which will host this object |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If specified application or parent is null. |
Fields
m_bIsDisposed
Flag which indicates if the object was disposed or not.
Declaration
protected bool m_bIsDisposed
Field Value
Type |
---|
System.Boolean |
Properties
AppImplementation
Reference to Application which hosts all objects. Read-only.
Declaration
public ApplicationImpl AppImplementation { get; }
Property Value
Type |
---|
ApplicationImpl |
Application
Reference to Application which hosts all objects. Read-only.
Declaration
public IApplication Application { get; }
Property Value
Type |
---|
IApplication |
Parent
Reference to Parent object. Read-only.
Declaration
public object Parent { get; }
Property Value
Type |
---|
System.Object |
ReferenceCount
Get quantity of instance references.
Declaration
public int ReferenceCount { get; }
Property Value
Type |
---|
System.Int32 |
Methods
AddReference()
Increase the quantity of reference. User must use this method when new wrapper on object is created or reference on object stored.
Declaration
public virtual int AddReference()
Returns
Type | Description |
---|---|
System.Int32 | New state of Reference count value. |
CheckDisposed()
Checks whether object was disposed and throws exception if it was.
Declaration
protected void CheckDisposed()
Dispose()
Dispose object and free resources.
Declaration
public virtual void Dispose()
Finalize()
Destructor. Call dispose method of current object.
Declaration
protected override void Finalize()
FindParent(Object, Type)
This method is used to find parent with specific type.
Declaration
public static object FindParent(object parentStart, Type parentType)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parentStart | Start object for search operation. |
System.Type | parentType | Parent type to locate. |
Returns
Type | Description |
---|---|
System.Object | The found parent or NULL if parent was not found. |
FindParent(Object, Type, Boolean)
This method is used to find parent with specific type.
Declaration
public static object FindParent(object parentStart, Type parentType, bool bSubTypes)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parentStart | Start object for search operation. |
System.Type | parentType | Parent type to locate. |
System.Boolean | bSubTypes | Indicates whether to search subtypes. |
Returns
Type | Description |
---|---|
System.Object | The found parent or NULL if parent was not found. |
FindParent(Type)
This method is used to find parent with specific type.
Declaration
public object FindParent(Type parentType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | parentType | Parent type to locate. |
Returns
Type | Description |
---|---|
System.Object | The found parent or NULL if parent was not found. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | When there is cycle in object tree. |
FindParent(Type, Boolean)
This method is used to find parent with specific type.
Declaration
public object FindParent(Type parentType, bool bSubTypes)
Parameters
Type | Name | Description |
---|---|---|
System.Type | parentType | Parent type to locate. |
System.Boolean | bSubTypes | Indicates whether to search subtypes. |
Returns
Type | Description |
---|---|
System.Object | The found parent or NULL if parent was not found. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | When there is cycle in object tree. |
FindParent(Type[])
Find parent of object.
Declaration
public object FindParent(Type[] arrTypes)
Parameters
Type | Name | Description |
---|---|---|
System.Type[] | arrTypes | Array of parents type. |
Returns
Type | Description |
---|---|
System.Object | Returns found parent object. |
FindParents(Type[])
Finds parent objects.
Declaration
public object[] FindParents(Type[] arrTypes)
Parameters
Type | Name | Description |
---|---|---|
System.Type[] | arrTypes | Array of parents type. |
Returns
Type | Description |
---|---|
System.Object[] | Returns array of found parent objects. |
OnDispose()
Method which can be overridden by users to take any specific actions when object is disposed.
Declaration
protected virtual void OnDispose()
ReleaseReference()
Decrease quantity of Reference. User must call this method when freeing resources.
Declaration
public virtual int ReleaseReference()
Returns
Type | Description |
---|---|
System.Int32 | New state of Reference count value. |
SetParent(Object)
Sets parent of the object.
Declaration
protected void SetParent(object parent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | New parent for this object. |