Class RealizationConverter
Converter for a realization. Handles both parameters and string (Uses XML serialization)
Inherited Members
Namespace: Xareus.Scenarios.Relations.TypeConverter
Assembly: Xareus.Scenarios.Relations.dll
Syntax
[TypeConverterFor(typeof(Realization))]
public class RealizationConverter : TypeConverter
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 from a string or parameter to a realization
Declaration
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Parameters
Type | Name | Description |
---|---|---|
ITypeDescriptorContext | context | |
CultureInfo | culture | |
object | value |
Returns
Type | Description |
---|---|
object |
Overrides
ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)
Converts a realization to a string or a simple parameter (with value)
Declaration
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters
Type | Name | Description |
---|---|---|
ITypeDescriptorContext | context | |
CultureInfo | culture | |
object | value | |
Type | destinationType |
Returns
Type | Description |
---|---|
object |