Interface ITypeChanger<T>
Represents an interface for mapping generic objects to different types.
Namespace: Microsoft.XboxStudios.GameStateTracker.Generic
Assembly: GameStateTracker.Generic.Abstractions.dll
Syntax
public interface ITypeChanger<T>
Type Parameters
Name | Description |
---|---|
T | The object type. |
Methods
View SourceIsAssignableFrom(T, string)
Determines if the object has a base class with the given name.
Declaration
bool IsAssignableFrom(T input, string className)
Parameters
Type | Name | Description |
---|---|---|
T | input | The input object. |
string | className | The class name. |
Returns
Type | Description |
---|---|
bool | True if the object is assignable from the given name. |
TryConvert(T, out T)
Attempts to convert the input object to a more specific type.
Declaration
bool TryConvert(T input, out T output)
Parameters
Type | Name | Description |
---|---|---|
T | input | The object to convert. |
T | output | The output object, or the original object if conversion failed. |
Returns
Type | Description |
---|---|
bool | True if the object was converted to more specific type. |