C# 클래스 Castle.Components.Binder.DefaultConverter

상속: System.MarshalByRefObject, IConverter
파일 보기 프로젝트 열기: nats/castle-1.0.3-mono 1 사용 예제들

공개 메소드들

메소드 설명
CanConvert ( Type desiredType, Type inputType, object input, bool &exactMatch ) : bool
Convert ( Type desiredType, Type inputType, object input, bool &conversionSucceeded ) : object
Convert ( Type desiredType, object input, bool &conversionSucceeded ) : object

Convert the input param into the desired type

There are 3 possible cases when trying to convert: 1) Input data for conversion missing (input is null or an empty String) Returns default conversion value (based on desired type) and set conversionSucceeded = false 2) Has input data but cannot convert to particular type Throw exception and set conversionSucceeded = false 3) Has input data and can convert to particular type Return input converted to desired type and set conversionSucceeded = true

비공개 메소드들

메소드 설명
ConvertDate ( object input, bool &conversionSucceeded ) : object
ConvertDecimal ( object input, bool &conversionSucceeded ) : object
ConvertEnum ( Type desiredType, object input, bool &conversionSucceeded ) : object
ConvertGenericList ( Type desiredType, object input, bool &conversionSucceeded ) : object
ConvertGuid ( object input, bool &conversionSucceeded ) : object
ConvertNullable ( Type desiredType, object input, bool &conversionSucceeded ) : object
ConvertPrimitive ( Type desiredType, object input, bool &conversionSucceeded ) : object
ConvertToArray ( Type desiredType, object input, bool &conversionSucceeded ) : object
ConvertUsingTypeConverter ( Type desiredType, object input, bool &conversionSucceeded ) : object

Support for types that specify a TypeConverter, i.e.: NullableTypes

FixInputForMonoIfNeeded ( Type elemType, object input ) : object

Fix for mod_mono issue where array values are passed as a comma seperated String.

IsBool ( Type desiredType ) : bool
NormalizeInput ( object input ) : String
SpecialBoolConversion ( string value, object input, bool &conversionSucceeded ) : object
ThrowInformativeException ( Type desiredType, object input, Exception inner ) : void

메소드 상세

CanConvert() 공개 메소드

public CanConvert ( Type desiredType, Type inputType, object input, bool &exactMatch ) : bool
desiredType System.Type
inputType System.Type
input object
exactMatch bool
리턴 bool

Convert() 공개 메소드

public Convert ( Type desiredType, Type inputType, object input, bool &conversionSucceeded ) : object
desiredType System.Type
inputType System.Type
input object
conversionSucceeded bool
리턴 object

Convert() 공개 메소드

Convert the input param into the desired type
There are 3 possible cases when trying to convert: 1) Input data for conversion missing (input is null or an empty String) Returns default conversion value (based on desired type) and set conversionSucceeded = false 2) Has input data but cannot convert to particular type Throw exception and set conversionSucceeded = false 3) Has input data and can convert to particular type Return input converted to desired type and set conversionSucceeded = true
public Convert ( Type desiredType, object input, bool &conversionSucceeded ) : object
desiredType System.Type Type of the desired
input object The input
conversionSucceeded bool if false the return value must be ignored
리턴 object