C# 클래스 FdoToolbox.Core.Feature.ValueConverter

Utility class to perform conversion to/from/between FDO and CLR data types
파일 보기 프로젝트 열기: jumpinjackie/fdotoolbox

공개 메소드들

메소드 설명
ConvertDataValue ( DataValue src, DataType dataType ) : DataValue

Converts a source DataValue to a DataValue of the given type. Incompatible values are converted to null and values outside the valid range are truncated

ConvertDataValue ( DataValue src, DataType dataType, bool nullIfIncompatible, bool truncate ) : DataValue

Converts a source DataValue to a DataValue of the given type

FromDataType ( DataType dt ) : FdoPropertyType

Converts a FDO data type to a FDO property type

GetClrValue ( DataValue val ) : object

Gets the CLR value.

GetConvertedValue ( object value ) : LiteralValue

Gets a FDO literal value type from a CLR type

GetDataType ( FdoPropertyType pt ) : DataType?

Gets the data type

GetPropertyType ( DataType dt ) : FdoPropertyType

Gets the property type

IsConvertible ( DataType src, DataType dest ) : bool

Determines if one data type can be converted to another

비공개 메소드들

메소드 설명
ConvertBoolean ( BooleanValue src, DataType dataType ) : DataValue
ConvertByte ( ByteValue src, DataType dataType ) : DataValue
ConvertDateTime ( DateTimeValue src, DataType dataType ) : DataValue
ConvertDecimal ( DecimalValue src, DataType dataType, bool truncate ) : DataValue
ConvertDouble ( DoubleValue doubleValue, DataType dataType, bool truncate ) : DataValue
ConvertInt16 ( Int16Value int16Value, DataType dataType, bool truncate ) : DataValue
ConvertInt32 ( Int32Value int32Value, DataType dataType, bool truncate ) : DataValue
ConvertInt64 ( Int64Value int64Value, DataType dataType, bool truncate ) : DataValue
ConvertSingle ( SingleValue singleValue, DataType dataType, bool truncate ) : DataValue
ConvertString ( StringValue stringValue, DataType dataType, bool truncate ) : DataValue

메소드 상세

ConvertDataValue() 공개 정적인 메소드

Converts a source DataValue to a DataValue of the given type. Incompatible values are converted to null and values outside the valid range are truncated
public static ConvertDataValue ( DataValue src, DataType dataType ) : DataValue
src DataValue The source data value
dataType DataType The data type to convert to
리턴 DataValue

ConvertDataValue() 공개 정적인 메소드

Converts a source DataValue to a DataValue of the given type
public static ConvertDataValue ( DataValue src, DataType dataType, bool nullIfIncompatible, bool truncate ) : DataValue
src DataValue The source data value
dataType DataType The data type to convert to
nullIfIncompatible bool Determines what happens if the source and destination types are incompatible
truncate bool Determines what happens if the value is outside the valid range for the destination type (e.g. convert 1000000 from FdoInt32Value to FdoInt16Value). Applicable only when both source and destination types are one of Boolean, Byte, Decimal, Double, Int16, Int32, Int64 or Single
리턴 DataValue

FromDataType() 공개 정적인 메소드

Converts a FDO data type to a FDO property type
public static FromDataType ( DataType dt ) : FdoPropertyType
dt DataType
리턴 FdoPropertyType

GetClrValue() 공개 정적인 메소드

Gets the CLR value.
public static GetClrValue ( DataValue val ) : object
val DataValue The val.
리턴 object

GetConvertedValue() 공개 정적인 메소드

Gets a FDO literal value type from a CLR type
public static GetConvertedValue ( object value ) : LiteralValue
value object
리턴 LiteralValue

GetDataType() 공개 정적인 메소드

Gets the data type
public static GetDataType ( FdoPropertyType pt ) : DataType?
pt FdoPropertyType The
리턴 DataType?

GetPropertyType() 공개 정적인 메소드

Gets the property type
public static GetPropertyType ( DataType dt ) : FdoPropertyType
dt DataType The data type
리턴 FdoPropertyType

IsConvertible() 공개 정적인 메소드

Determines if one data type can be converted to another
public static IsConvertible ( DataType src, DataType dest ) : bool
src DataType The source data type
dest DataType The target data type
리턴 bool