Class IDOMCaster
Provides a registry for converting one IDOMObject into a specific derived type.
Inherited Members
Namespace: CoverageKiller2.DOM
Assembly: CoverageKiller2.dll
Syntax
public static class IDOMCaster
Remarks
Version: CK2.00.01.0010
Methods
Cast<T>(IDOMObject)
Attempts to convert the input IDOMObject to a specific derived type using a registered caster.
Declaration
public static T Cast<T>(IDOMObject input) where T : IDOMObject
Parameters
Type | Name | Description |
---|---|---|
IDOMObject | input | The source object to convert. |
Returns
Type | Description |
---|---|
T | The converted object of type T. |
Type Parameters
Name | Description |
---|---|
T | The derived type to return. |
Register<T>(Func<IDOMObject, T>)
Registers a caster function that creates a specific derived IDOMObject from a general one.
Declaration
public static void Register<T>(Func<IDOMObject, T> caster) where T : IDOMObject
Parameters
Type | Name | Description |
---|---|---|
Func<IDOMObject, T> | caster | A function that accepts an IDOMObject and returns a T. |
Type Parameters
Name | Description |
---|---|
T | The type to cast to. |