Class ScriptTypeProvider<TReturnType>
- Namespace
- Dynamicweb.DataIntegration.Integration
- Assembly
- Dynamicweb.DataIntegration.dll
Typed convenience base class for ScriptTypeProvider implementations that always return a value of
TReturnType. Implement GetValueTyped(object?) instead of
GetValue(object?).
public abstract class ScriptTypeProvider<TReturnType> : ScriptTypeProvider
Type Parameters
TReturnTypeThe type of value the provider returns; should be compatible with the destination column types the provider is used with (see AllowedTypes).
- Inheritance
-
ScriptTypeProvider<TReturnType>
- Derived
- Inherited Members
Methods
GetValue(object?)
Transforms a source value into the value written to the destination column. Called once per row during job execution with the value of SourceColumn for that row.
public override object? GetValue(object? input)
Parameters
inputobjectThe value read from the source column for the current row. May be
nullor DBNull, and is alwaysnullwhen DisableSource istrueand no source column is mapped.
Returns
- object
The value to write to the destination column. Must be compatible with the destination column type, as no further type conversion is applied.
GetValueTyped(object?)
Transforms a source value into the typed value written to the destination column. Called once per row during job execution. See GetValue(object?) for the contract.
public abstract TReturnType GetValueTyped(object? input)
Parameters
Returns
- TReturnType
The value to write to the destination column.