Reference
OpcDataTypeMapper Members
Provides an abstract implementation of the IOpcDataTypeMapper interface.
Reference
OpcDataTypeMapper Members
- Type
- OpcDataTypeMapper
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Constructors
OpcDataTypeMapper
Initializes a new instance of the OpcDataTypeMapper class.
protected OpcDataTypeMapper()Protected Sub New()Properties
SourceType
Gets the Type from an object can be mapped to the TargetType using this OpcDataTypeMapper.
public abstract Type SourceType { get; }Public MustOverride ReadOnly Property SourceType As TypeProperty value
The Type which can be mapped.
TargetType
Gets the Type to that an object is mapped using this OpcDataTypeMapper.
public abstract Type TargetType { get; }Public MustOverride ReadOnly Property TargetType As TypeProperty value
The resulting Type after mapping an object of the SourceType.
Methods
Convert
Converts the sourceobject to a specific type.
public object Convert(object source, IFormatProvider provider)Public Function Convert(source As Object, provider As IFormatProvider) As ObjectParameters
| Name | Type | Description |
|---|---|---|
source | Object | The sourceobject to convert. |
provider | IFormatProvider | The IFormatProvider to control any formatting which may be necessary for the convertion. |
Returns
The converted object determined through the sourceobject and the provider specified.
Implements
ConvertBack
Converts the targetobject to the type from which the value has been created.
public object ConvertBack(object target, IFormatProvider provider)Public Function ConvertBack(
target As Object,
provider As IFormatProvider) As ObjectParameters
| Name | Type | Description |
|---|---|---|
target | Object | The targetobject to convert back. |
provider | IFormatProvider | The IFormatProvider to control any formatting which may be necessary for the convertion. |
Returns
The source object from which target has been created.
Implements
ConvertBackCore
When implemented in a derived class; converts the targetobject to the type from which the value has been created.
protected abstract object ConvertBackCore(
object target,
IFormatProvider provider)Protected MustOverride Function ConvertBackCore(
target As Object,
provider As IFormatProvider) As ObjectParameters
| Name | Type | Description |
|---|---|---|
target | Object | The targetobject to convert back. |
provider | IFormatProvider | The IFormatProvider to control any formatting which may be necessary for the convertion. |
Returns
The source object from which target has been created.
Remarks
This method is only used in case there target is not a null reference (Nothing in Visual Basic).
ConvertCore
When implemented in a derived class; converts the sourceobject to a specific type.
protected abstract object ConvertCore(object source, IFormatProvider provider)Protected MustOverride Function ConvertCore(
source As Object,
provider As IFormatProvider) As ObjectParameters
| Name | Type | Description |
|---|---|---|
source | Object | The sourceobject to convert. |
provider | IFormatProvider | The IFormatProvider to control any formatting which may be necessary for the convertion. |
Returns
The converted object determined through the sourceobject and the provider specified.
Remarks
This method is only used in case there source is not a null reference (Nothing in Visual Basic).
Convertible
Provides an OpcDataTypeMapper which utilizes the IConvertible interface implemented by the TSource and TTarget types.
public static OpcDataTypeMapper Convertible<TSource, TTarget>()
where TSource : IConvertible
where TTarget : IConvertiblePublic Shared Function Convertible(Of TSource As IConvertible, TTarget As IConvertible)() As OpcDataTypeMapperType parameters
| Name | Description |
|---|---|
TSource | The Type implementing the IConvertible interface and which is to be mapped to the TTarget type. |
TTarget | The resulting Type (TSource type. |
Returns
An instance of the OpcDataTypeMapper class utilizing the IConvertible implementations of the TSource and TTarget to convert between the types.
Delegate
Provides an OpcDataTypeMapper which uses the convert and convertBack delegates.
public static OpcDataTypeMapper Delegate<TSource, TTarget>(
Func<TSource, IFormatProvider, TTarget> convert,
Func<TTarget, IFormatProvider, TSource> convertBack)Public Shared Function [Delegate](Of TSource, TTarget)(
convert As Func(Of TSource, IFormatProvider, TTarget),
convertBack As Func(Of TTarget, IFormatProvider, TSource)) As OpcDataTypeMapperType parameters
| Name | Description |
|---|---|
TSource | The Type which is to be mapped to the TTarget type. |
TTarget | The resulting Type after mapping an object of the TSource type. |
Parameters
| Name | Type | Description |
|---|---|---|
convert | Func< | The delegate to use to map the TSourceobject to the TTarget type. |
convertBack | Func< | The delegate to use to map the TTargetobject back to the TSource type. |
Returns
Exceptions
| Exception | Condition |
|---|---|
| Argument | The convert or convertBack is a null reference ( |

