Class RelationConverter
Converts a relation to a string or parameter (uses the relation name)
Inherited Members
Namespace: Xareus.Scenarios.Relations.TypeConverter
Assembly: Xareus.Scenarios.Relations.dll
Syntax
[TypeConverterFor(typeof(IRelation))]
public class RelationConverter : 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)
Convert from string or parameter to relation
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 relation to a string or simple parameter
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 |