Class SequenceStateConverter
SequenceState converter
Inherited Members
Namespace: Xareus.Scenarios.Converter
Assembly: Xareus.Scenarios.dll
Syntax
[TypeConverterFor(typeof(SequenceState))]
public class SequenceStateConverter : CollectionConverter
Fields
TOKENS
Declaration
protected const string TOKENS = "Tokens"
Field Value
Type | Description |
---|---|
string |
Methods
CanConvertFrom(ITypeDescriptorContext, Type)
Returns whether this converter can convert an object of the given type to the type of this converter, using the specified context.
Declaration
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Parameters
Type | Name | Description |
---|---|---|
ITypeDescriptorContext | context | An ITypeDescriptorContext that provides a format context. |
Type | sourceType | A Type that represents the type you want to convert from. |
Returns
Type | Description |
---|---|
bool | true if this converter can perform the conversion; otherwise, false. |
Overrides
CanConvertTo(ITypeDescriptorContext, Type)
Returns whether this converter can convert the object to the specified type, using the specified context.
Declaration
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
Parameters
Type | Name | Description |
---|---|---|
ITypeDescriptorContext | context | An ITypeDescriptorContext that provides a format context. |
Type | destinationType | A Type that represents the type you want to convert to. |
Returns
Type | Description |
---|---|
bool | true if this converter can perform the conversion; otherwise, false. |
Overrides
ConvertFrom(ITypeDescriptorContext, CultureInfo, object)
Converts the given object to the type of this converter, using the specified context and culture information.
Declaration
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Parameters
Type | Name | Description |
---|---|---|
ITypeDescriptorContext | context | An ITypeDescriptorContext that provides a format context. |
CultureInfo | culture | The CultureInfo to use as the current culture. |
object | value | The object to convert. |
Returns
Type | Description |
---|---|
object | An object that represents the converted value. |
Overrides
Exceptions
Type | Condition |
---|---|
NotSupportedException | The conversion cannot be performed. |
ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)
Converts the given value object to the specified destination type.
Declaration
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters
Type | Name | Description |
---|---|---|
ITypeDescriptorContext | context | An ITypeDescriptorContext that provides a format context. |
CultureInfo | culture | The culture to which |
object | value | The object to convert. This parameter must inherit from ICollection. |
Type | destinationType | The Type to convert the value to. |
Returns
Type | Description |
---|---|
object | An object that represents the converted value. |
Overrides
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
NotSupportedException | The conversion cannot be performed. |