C# 클래스 ExoModel.ETL.ModelTranslator

Translates from one ModelType to another using a set of property translation expressions.
파일 보기 프로젝트 열기: vc3/ExoModel 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CreatePropertyTranslator PropertyTranslator
EnsureDestinationInstance bool

공개 메소드들

메소드 설명
AddPropertyTranslation ( string sourceExpression, string destinationPath, string>.Func delegateConverter ) : void

Adds a value PropertyTranslator to the current ModelTranslator

AddPropertyTranslation ( string sourceExpression, string destinationPath, ModelTranslator referenceConverter ) : void

Adds a value PropertyTranslator to the current ModelTranslator.

AddPropertyTranslation ( string sourceExpression, string destinationPath, TypeConverter valueConverter = null ) : void

Adds a value PropertyTranslator to the current ModelTranslator.

ModelTranslator ( ModelType sourceType, ModelType destinationType, ModelTranslator parent = null, IEnumerable mappings = null, TypeConverter>.Func getValueConverter = null, ModelInstance>.Func createDestinationInstance = null ) : System

Creates a new ModelTranslator to support translation from the specified source ModelType to the specified destination ModelType with a specified set of property translations.

Translate ( IEnumerable sourceInstances ) : IEnumerable

Translates the specified instances of the source type into the destination type.

Translate ( ModelInstance source ) : ModelInstance

Translates the specified instance of the source type into the destination type.

비공개 메소드들

메소드 설명
CreatePropertyTranslator ( string sourceExpression, string destinationPath ) : PropertyTranslator

Initializes a PropertyTranslator

EnsureDestinationInstance ( ModelInstance instance, ModelReferenceProperty property, int index ) : bool

Ensure the destination instance path is valid when nulls are encountered along the path.

메소드 상세

AddPropertyTranslation() 공개 메소드

Adds a value PropertyTranslator to the current ModelTranslator
public AddPropertyTranslation ( string sourceExpression, string destinationPath, string>.Func delegateConverter ) : void
sourceExpression string The source expression
destinationPath string The destination path
delegateConverter string>.Func The delegate to use to generate the translated value
리턴 void

AddPropertyTranslation() 공개 메소드

Adds a value PropertyTranslator to the current ModelTranslator.
public AddPropertyTranslation ( string sourceExpression, string destinationPath, ModelTranslator referenceConverter ) : void
sourceExpression string The source expression
destinationPath string The destination path
referenceConverter ModelTranslator
리턴 void

AddPropertyTranslation() 공개 메소드

Adds a value PropertyTranslator to the current ModelTranslator.
public AddPropertyTranslation ( string sourceExpression, string destinationPath, TypeConverter valueConverter = null ) : void
sourceExpression string The source expression
destinationPath string The destination path
valueConverter System.ComponentModel.TypeConverter The optional value converter to use
리턴 void

ModelTranslator() 공개 메소드

Creates a new ModelTranslator to support translation from the specified source ModelType to the specified destination ModelType with a specified set of property translations.
public ModelTranslator ( ModelType sourceType, ModelType destinationType, ModelTranslator parent = null, IEnumerable mappings = null, TypeConverter>.Func getValueConverter = null, ModelInstance>.Func createDestinationInstance = null ) : System
sourceType ModelType
destinationType ModelType
parent ModelTranslator
mappings IEnumerable
getValueConverter TypeConverter>.Func
createDestinationInstance ModelInstance>.Func
리턴 System

Translate() 공개 메소드

Translates the specified instances of the source type into the destination type.
public Translate ( IEnumerable sourceInstances ) : IEnumerable
sourceInstances IEnumerable The list of objects created dynamically that will need to be translated.
리턴 IEnumerable

Translate() 공개 메소드

Translates the specified instance of the source type into the destination type.
public Translate ( ModelInstance source ) : ModelInstance
source ModelInstance
리턴 ModelInstance