C# Класс Castle.Components.Binder.DataBinder

Наследование: System.MarshalByRefObject, IDataBinder, IServiceEnabledComponent
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
PropertiesBindingFlags BindingFlags
errors IList

Открытые методы

Метод Описание
BindObject ( Type targetType, string prefix, Castle.Components.Binder.CompositeNode treeRoot ) : object
BindObject ( Type targetType, string prefix, string excludedProperties, string allowedProperties, Castle.Components.Binder.CompositeNode treeRoot ) : object
BindObjectInstance ( object instance, string prefix, Castle.Components.Binder.CompositeNode treeRoot ) : void
BindObjectInstance ( object instance, string prefix, string excludedProperties, string allowedProperties, Castle.Components.Binder.CompositeNode treeRoot ) : void
BindParameter ( Type desiredType, String paramName, Castle.Components.Binder.CompositeNode treeRoot ) : object
CanBindObject ( Type targetType, String prefix, Castle.Components.Binder.CompositeNode treeRoot ) : bool
CanBindParameter ( Type desiredType, String paramName, Castle.Components.Binder.CompositeNode treeRoot ) : bool
DataBinder ( ) : System

Initializes a new instance of the DataBinder class.

GetValidationSummary ( object instance ) : ErrorSummary

Gets the validation error summary.

Service ( IServiceProvider provider ) : void

Защищенные методы

Метод Описание
AfterBinding ( object instance, String prefix, Castle.Components.Binder.Node node ) : void
BeforeBinding ( object instance, String prefix, Castle.Components.Binder.Node node ) : void
BeforeBindingProperty ( object instance, PropertyInfo prop, string prefix, Castle.Components.Binder.CompositeNode node ) : void
BindSpecialObjectInstance ( Type instanceType, String prefix, Castle.Components.Binder.Node node, bool &succeeded ) : object

Implementations will bound the instance itself. IsSpecialType

IsSpecialType

CheckForValidationFailures ( object instance, Type instanceType, PropertyInfo prop, Castle.Components.Binder.CompositeNode node, string name, string prefix, ErrorSummary summary ) : bool
CheckForValidationFailures ( object instance, Type instanceType, PropertyInfo prop, object value, string name, string prefix, ErrorSummary summary ) : bool
ConvertLeafNode ( Type desiredType, Castle.Components.Binder.LeafNode lNode, bool &conversionSucceeded ) : object
CreateInstance ( Type instanceType, String paramPrefix, Castle.Components.Binder.Node node ) : object
CreateNormalizedList ( String csv ) : String[]
InternalBindObject ( Type instanceType, String paramPrefix, Castle.Components.Binder.Node node ) : object
InternalBindObject ( Type instanceType, String paramPrefix, Castle.Components.Binder.Node node, bool &succeeded ) : object
InternalRecursiveBindObjectInstance ( object instance, String prefix, Castle.Components.Binder.CompositeNode node ) : void
InternalRecursiveBindObjectInstance ( object instance, String prefix, Castle.Components.Binder.Node node ) : void
IsSpecialType ( Type instanceType ) : bool

Invoked during object binding to allow subclasses to have a chance of binding the types itself. If the implementation returns true the binder will invoke BindSpecialObjectInstance

PerformCustomBinding ( object instance, string prefix, Castle.Components.Binder.Node node ) : bool
PopInstance ( object instance, string prefix ) : void
PushInstance ( object instance, string prefix ) : void
SetPropertyValue ( object instance, PropertyInfo prop, object value ) : void

Sets the property value of the object we are binding. Databinders that require different ways to access properties can override this method.

ShouldIgnoreType ( Type instanceType ) : bool
ShouldRecreateInstance ( object value, Type type, String prefix, Castle.Components.Binder.Node node ) : bool

Приватные методы

Метод Описание
ConvertComplexNodesToArray ( Type desiredType, Castle.Components.Binder.IndexedNode parent, bool &conversionSucceeded ) : object
ConvertComplexNodesToList ( Type elemType, Castle.Components.Binder.IndexedNode parent, bool &conversionSucceeded ) : ArrayList
ConvertFlatNodesToArray ( Type desiredType, Castle.Components.Binder.Node nodes, bool &conversionSucceeded ) : object
ConvertFlatNodesToList ( Type elemType, Castle.Components.Binder.Node nodes, bool &conversionSucceeded ) : ArrayList
ConvertToArray ( Type desiredType, String key, Castle.Components.Binder.Node node, bool &conversionSucceeded ) : object
ConvertToGenericList ( Type desiredType, String key, Castle.Components.Binder.Node node, bool &conversionSucceeded ) : object
ConvertToSimpleValue ( Type desiredType, string key, Castle.Components.Binder.CompositeNode parent, bool &conversionSucceeded ) : object
InternalBindGenericList ( Type instanceType, string paramPrefix, Castle.Components.Binder.Node node, bool &succeeded ) : object
InternalBindObjectArray ( Type instanceType, String paramPrefix, Castle.Components.Binder.Node node, bool &succeeded ) : object
IsDateTimeType ( Type desiredType ) : bool
IsGenericList ( Type instanceType ) : bool
IsSimpleProperty ( Type propType ) : bool
NormalizeList ( String list ) : void
RelaxedConvertLeafNode ( Type desiredType, Castle.Components.Binder.Node node, object defaultValue ) : object
ShouldIgnoreProperty ( PropertyInfo prop, string nodeFullName ) : bool
Translate ( Type instanceType, string paramName ) : string
TryGetDateWithUTCFormat ( Castle.Components.Binder.CompositeNode treeRoot, string paramName, bool &conversionSucceeded ) : string
TrySpecialDateTimeBinding ( Type desiredType, Castle.Components.Binder.CompositeNode treeRoot, String paramName, bool &conversionSucceeded ) : object

Описание методов

AfterBinding() защищенный Метод

protected AfterBinding ( object instance, String prefix, Castle.Components.Binder.Node node ) : void
instance object
prefix String
node Castle.Components.Binder.Node
Результат void

BeforeBinding() защищенный Метод

protected BeforeBinding ( object instance, String prefix, Castle.Components.Binder.Node node ) : void
instance object
prefix String
node Castle.Components.Binder.Node
Результат void

BeforeBindingProperty() защищенный Метод

protected BeforeBindingProperty ( object instance, PropertyInfo prop, string prefix, Castle.Components.Binder.CompositeNode node ) : void
instance object
prop System.Reflection.PropertyInfo
prefix string
node Castle.Components.Binder.CompositeNode
Результат void

BindObject() публичный Метод

public BindObject ( Type targetType, string prefix, Castle.Components.Binder.CompositeNode treeRoot ) : object
targetType System.Type
prefix string
treeRoot Castle.Components.Binder.CompositeNode
Результат object

BindObject() публичный Метод

public BindObject ( Type targetType, string prefix, string excludedProperties, string allowedProperties, Castle.Components.Binder.CompositeNode treeRoot ) : object
targetType System.Type
prefix string
excludedProperties string
allowedProperties string
treeRoot Castle.Components.Binder.CompositeNode
Результат object

BindObjectInstance() публичный Метод

public BindObjectInstance ( object instance, string prefix, Castle.Components.Binder.CompositeNode treeRoot ) : void
instance object
prefix string
treeRoot Castle.Components.Binder.CompositeNode
Результат void

BindObjectInstance() публичный Метод

public BindObjectInstance ( object instance, string prefix, string excludedProperties, string allowedProperties, Castle.Components.Binder.CompositeNode treeRoot ) : void
instance object
prefix string
excludedProperties string
allowedProperties string
treeRoot Castle.Components.Binder.CompositeNode
Результат void

BindParameter() публичный Метод

public BindParameter ( Type desiredType, String paramName, Castle.Components.Binder.CompositeNode treeRoot ) : object
desiredType System.Type
paramName String
treeRoot Castle.Components.Binder.CompositeNode
Результат object

BindSpecialObjectInstance() защищенный Метод

Implementations will bound the instance itself. IsSpecialType
IsSpecialType
protected BindSpecialObjectInstance ( Type instanceType, String prefix, Castle.Components.Binder.Node node, bool &succeeded ) : object
instanceType System.Type
prefix String
node Castle.Components.Binder.Node
succeeded bool
Результат object

CanBindObject() публичный Метод

public CanBindObject ( Type targetType, String prefix, Castle.Components.Binder.CompositeNode treeRoot ) : bool
targetType System.Type
prefix String
treeRoot Castle.Components.Binder.CompositeNode
Результат bool

CanBindParameter() публичный Метод

public CanBindParameter ( Type desiredType, String paramName, Castle.Components.Binder.CompositeNode treeRoot ) : bool
desiredType System.Type
paramName String
treeRoot Castle.Components.Binder.CompositeNode
Результат bool

CheckForValidationFailures() защищенный Метод

protected CheckForValidationFailures ( object instance, Type instanceType, PropertyInfo prop, Castle.Components.Binder.CompositeNode node, string name, string prefix, ErrorSummary summary ) : bool
instance object
instanceType System.Type
prop System.Reflection.PropertyInfo
node Castle.Components.Binder.CompositeNode
name string
prefix string
summary Castle.Components.Validator.ErrorSummary
Результат bool

CheckForValidationFailures() защищенный Метод

protected CheckForValidationFailures ( object instance, Type instanceType, PropertyInfo prop, object value, string name, string prefix, ErrorSummary summary ) : bool
instance object
instanceType System.Type
prop System.Reflection.PropertyInfo
value object
name string
prefix string
summary Castle.Components.Validator.ErrorSummary
Результат bool

ConvertLeafNode() защищенный Метод

protected ConvertLeafNode ( Type desiredType, Castle.Components.Binder.LeafNode lNode, bool &conversionSucceeded ) : object
desiredType System.Type
lNode Castle.Components.Binder.LeafNode
conversionSucceeded bool
Результат object

CreateInstance() защищенный Метод

protected CreateInstance ( Type instanceType, String paramPrefix, Castle.Components.Binder.Node node ) : object
instanceType System.Type
paramPrefix String
node Castle.Components.Binder.Node
Результат object

CreateNormalizedList() защищенный Метод

protected CreateNormalizedList ( String csv ) : String[]
csv String
Результат String[]

DataBinder() публичный Метод

Initializes a new instance of the DataBinder class.
public DataBinder ( ) : System
Результат System

GetValidationSummary() публичный Метод

Gets the validation error summary.
public GetValidationSummary ( object instance ) : ErrorSummary
instance object The instance.
Результат Castle.Components.Validator.ErrorSummary

InternalBindObject() защищенный Метод

protected InternalBindObject ( Type instanceType, String paramPrefix, Castle.Components.Binder.Node node ) : object
instanceType System.Type
paramPrefix String
node Castle.Components.Binder.Node
Результат object

InternalBindObject() защищенный Метод

protected InternalBindObject ( Type instanceType, String paramPrefix, Castle.Components.Binder.Node node, bool &succeeded ) : object
instanceType System.Type
paramPrefix String
node Castle.Components.Binder.Node
succeeded bool
Результат object

InternalRecursiveBindObjectInstance() защищенный Метод

protected InternalRecursiveBindObjectInstance ( object instance, String prefix, Castle.Components.Binder.CompositeNode node ) : void
instance object
prefix String
node Castle.Components.Binder.CompositeNode
Результат void

InternalRecursiveBindObjectInstance() защищенный Метод

protected InternalRecursiveBindObjectInstance ( object instance, String prefix, Castle.Components.Binder.Node node ) : void
instance object
prefix String
node Castle.Components.Binder.Node
Результат void

IsSpecialType() защищенный Метод

Invoked during object binding to allow subclasses to have a chance of binding the types itself. If the implementation returns true the binder will invoke BindSpecialObjectInstance
protected IsSpecialType ( Type instanceType ) : bool
instanceType System.Type Type about to be bound
Результат bool

PerformCustomBinding() защищенный Метод

protected PerformCustomBinding ( object instance, string prefix, Castle.Components.Binder.Node node ) : bool
instance object
prefix string
node Castle.Components.Binder.Node
Результат bool

PopInstance() защищенный Метод

protected PopInstance ( object instance, string prefix ) : void
instance object
prefix string
Результат void

PushInstance() защищенный Метод

protected PushInstance ( object instance, string prefix ) : void
instance object
prefix string
Результат void

Service() публичный Метод

public Service ( IServiceProvider provider ) : void
provider IServiceProvider
Результат void

SetPropertyValue() защищенный Метод

Sets the property value of the object we are binding. Databinders that require different ways to access properties can override this method.
protected SetPropertyValue ( object instance, PropertyInfo prop, object value ) : void
instance object
prop System.Reflection.PropertyInfo
value object
Результат void

ShouldIgnoreType() защищенный Метод

protected ShouldIgnoreType ( Type instanceType ) : bool
instanceType System.Type
Результат bool

ShouldRecreateInstance() защищенный Метод

protected ShouldRecreateInstance ( object value, Type type, String prefix, Castle.Components.Binder.Node node ) : bool
value object
type System.Type
prefix String
node Castle.Components.Binder.Node
Результат bool

Описание свойств

PropertiesBindingFlags защищенное статическое свойство

protected static BindingFlags PropertiesBindingFlags
Результат BindingFlags

errors защищенное свойство

Collect the databind errors
protected IList errors
Результат IList