C# Класс Castle.MonoRail.ActiveRecordSupport.ARDataBinder

Extends DataBinder class with some ActiveRecord specific functionality. AutoLoadBehavior ARDataBindAttribute
Autoload can be turned on on the parameter, see AutoLoadBehavior.
Наследование: Castle.Components.Binder.DataBinder
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
EmptyArg object[]

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

Метод Описание
BindObject ( Type targetType, string prefix, string exclude, string allow, string expect, Castle.Components.Binder.CompositeNode treeRoot ) : object

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

Метод Описание
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
CreateInstance ( Type instanceType, String paramPrefix, Castle.Components.Binder.Node node ) : object
FindByPrimaryKey ( Type targetType, object id ) : object
FindByPrimaryKey ( Type targetType, object id, bool throwOnNotFound ) : object
FindPropertyInHasAndBelongsToMany ( ActiveRecordModel model, string propertyName, Type &foundType, ActiveRecordModel &foundModel ) : bool

for joined subclasses HasAndBelongsToMany properties doesn't include the ones of the parent class so we need to check them recursively

FindPropertyInHasMany ( ActiveRecordModel model, string propertyName, Type &foundType, ActiveRecordModel &foundModel ) : bool

for joined subclasses HasMany properties doesn't include the ones of the parent class so we need to check them recursively

IsBelongsToRef ( ActiveRecordModel arModel, string prefix ) : bool

for joined subclasses BelongsTo properties doesn't include the ones of the parent class so we need to check them recursively

IsSpecialType ( Type instanceType ) : bool
PopInstance ( object instance, string prefix ) : void
PushInstance ( object instance, string prefix ) : void
SetPropertyValue ( object instance, PropertyInfo prop, object value ) : void
ShouldRecreateInstance ( object value, Type type, string prefix, Castle.Components.Binder.Node node ) : bool

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

Метод Описание
AddToContainer ( object container, object item ) : void
ClearContainer ( object instance ) : void
ClearExpectedCollectionProperties ( object instance, PropertyInfo prop ) : void
CreateContainer ( Type type ) : object
IsContainerType ( Type type ) : bool
IsPropertyExpected ( PropertyInfo prop, Castle.Components.Binder.CompositeNode node ) : bool
IsValidKey ( object id ) : bool
ObtainPrimaryKey ( ActiveRecordModel model ) : PrimaryKeyModel
ObtainPrimaryKeyValue ( ActiveRecordModel model, Castle.Components.Binder.CompositeNode node, String prefix, PrimaryKeyModel &pkModel ) : object

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

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, string exclude, string allow, string expect, Castle.Components.Binder.CompositeNode treeRoot ) : object
targetType System.Type
prefix string
exclude string
allow string
expect string
treeRoot Castle.Components.Binder.CompositeNode
Результат object

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

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

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

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

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

protected FindByPrimaryKey ( Type targetType, object id ) : object
targetType System.Type
id object
Результат object

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

protected FindByPrimaryKey ( Type targetType, object id, bool throwOnNotFound ) : object
targetType System.Type
id object
throwOnNotFound bool
Результат object

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

for joined subclasses HasAndBelongsToMany properties doesn't include the ones of the parent class so we need to check them recursively
protected FindPropertyInHasAndBelongsToMany ( ActiveRecordModel model, string propertyName, Type &foundType, ActiveRecordModel &foundModel ) : bool
model Castle.ActiveRecord.Framework.Internal.ActiveRecordModel
propertyName string
foundType System.Type
foundModel Castle.ActiveRecord.Framework.Internal.ActiveRecordModel
Результат bool

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

for joined subclasses HasMany properties doesn't include the ones of the parent class so we need to check them recursively
protected FindPropertyInHasMany ( ActiveRecordModel model, string propertyName, Type &foundType, ActiveRecordModel &foundModel ) : bool
model Castle.ActiveRecord.Framework.Internal.ActiveRecordModel
propertyName string
foundType System.Type
foundModel Castle.ActiveRecord.Framework.Internal.ActiveRecordModel
Результат bool

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

for joined subclasses BelongsTo properties doesn't include the ones of the parent class so we need to check them recursively
protected IsBelongsToRef ( ActiveRecordModel arModel, string prefix ) : bool
arModel Castle.ActiveRecord.Framework.Internal.ActiveRecordModel
prefix string
Результат bool

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

protected IsSpecialType ( Type instanceType ) : bool
instanceType System.Type
Результат 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

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

protected SetPropertyValue ( object instance, PropertyInfo prop, object value ) : void
instance object
prop System.Reflection.PropertyInfo
value object
Результат void

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

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

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

protected static object[] EmptyArg
Результат object[]