Interface IHostWrapper<T>
Interface defines a generic class wrapper. T is the class that is to be wrapped.
Namespace: Cireson.Core.Interfaces.Helpers
Assembly: Cireson.Core.Interfaces.dll
Syntax
public interface IHostWrapper<T>
where T : class
Type Parameters
Name | Description |
---|---|
T | Generic type parameter. |
Remarks
Admin, 8/24/2017.
Properties
View SourceHostObject
Fetches the host object.
Declaration
dynamic HostObject { get; }
Property Value
Type | Description |
---|---|
System.Object | The host object. |
Methods
View SourceIsHostType(Object)
Determines if the given object is the same type as the 3rd party host object.
Declaration
bool IsHostType(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object whose type is to be checked. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the object is the same type as the HostObject, else false. |
NewHostObject()
Constructs a new HostObject and assigns it to WrappedMsgObj.
Declaration
T NewHostObject()
Returns
Type | Description |
---|---|
T | A T. |
Remarks
Using the CreateInstance method instead of new so we do not have to use the new() constraint.
NewHostObject(Object[])
Constructs a new HostObject and assigns it to WrappedMsgObj.
Declaration
T NewHostObject(object[] args)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | args | Arguments to be passed tot he constructor. |
Returns
Type | Description |
---|---|
T | A T. |
WrapHost(Object)
Wraps a 3rd party object.
Declaration
void WrapHost(object hostObject)
Parameters
Type | Name | Description |
---|---|---|
System.Object | hostObject | The host object to be assigned. |