Show / Hide Table of Contents

Class DataConversionContextBuilder

A data conversion context builder.

Inheritance
System.Object
DataConversionContextBuilder
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Data.Conversion
Assembly: Kephas.Data.dll
Syntax
public class DataConversionContextBuilder

Constructors

| Improve this Doc View Source

DataConversionContextBuilder(IDataConversionContext)

Initializes a new instance of the DataConversionContextBuilder class.

Declaration
public DataConversionContextBuilder(IDataConversionContext conversionContext)
Parameters
Type Name Description
IDataConversionContext conversionContext

Context for the data conversion.

| Improve this Doc View Source

DataConversionContextBuilder(IDataSpace, IDataConversionService)

Initializes a new instance of the DataConversionContextBuilder class.

Declaration
public DataConversionContextBuilder(IDataSpace dataSpace, IDataConversionService conversionService)
Parameters
Type Name Description
IDataSpace dataSpace

The data space.

IDataConversionService conversionService

The data conversion service.

Properties

| Improve this Doc View Source

ConversionContext

Gets a context for the conversion.

Declaration
public IDataConversionContext ConversionContext { get; }
Property Value
Type Description
IDataConversionContext

The conversion context.

Methods

| Improve this Doc View Source

Merge(IDataConversionContext)

Merges the provided data conversion context into the existing one, overwriting the values.

Declaration
public DataConversionContextBuilder Merge(IDataConversionContext dataConversionContext)
Parameters
Type Name Description
IDataConversionContext dataConversionContext

The source context for the data conversion.

Returns
Type Description
DataConversionContextBuilder

This DataConversionContextBuilder.

| Improve this Doc View Source

ThrowOnError(Boolean)

Sets a value indicating whether the conversion should throw an exception on error, or swallow them.

Declaration
public DataConversionContextBuilder ThrowOnError(bool throwOnError = true)
Parameters
Type Name Description
System.Boolean throwOnError

True to throw on error, false to swallow the errors (optional). Default is true.

Returns
Type Description
DataConversionContextBuilder

This DataConversionContextBuilder.

| Improve this Doc View Source

WithRootSourceType(Type)

Uses the provided type for the source root object if the conversion needs to identify it.

Declaration
public DataConversionContextBuilder WithRootSourceType(Type rootSourceType)
Parameters
Type Name Description
System.Type rootSourceType

The type of the source root object.

Returns
Type Description
DataConversionContextBuilder

This DataConversionContextBuilder.

| Improve this Doc View Source

WithRootTargetType(Type)

Uses the provided type for the target root object if the conversion needs to create or identify it.

Declaration
public DataConversionContextBuilder WithRootTargetType(Type rootTargetType)
Parameters
Type Name Description
System.Type rootTargetType

The type of the target root object.

Returns
Type Description
DataConversionContextBuilder

This DataConversionContextBuilder.

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX