C# Класс Dynamitey.DynamicObjects.BaseFactory

Base Class for making a fluent factory using an Impromptu Interface return type.
Наследование: BaseObject
Показать файл Открыть проект

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

Метод Описание
TryGetMember ( System binder, object &result ) : bool

Provides the default implementation for operations that get instance as defined by GetInstanceForDynamicMember. Classes derived from the T:ImpromptuInterface.ImpromptuObject class can override this method to specify dynamic behavior for operations such as getting a value for a property.

TryInvokeMember ( System binder, object args, object &result ) : bool

Provides the implementation for operations that invoke a member. Classes derived from the T:System.Dynamic.DynamicObject class can override this method to specify dynamic behavior for operations such as calling a method.

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

Метод Описание
CreateType ( Type type ) : object

Constructs the type. Override for changing type intialization property changes.

GetInstanceForDynamicMember ( string memberName ) : object

Gets the instance for a dynamic member. Override for type constrcution behavoir changes based on property name.

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

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

Constructs the type. Override for changing type intialization property changes.
protected CreateType ( Type type ) : object
type System.Type The type.
Результат object

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

Gets the instance for a dynamic member. Override for type constrcution behavoir changes based on property name.
protected GetInstanceForDynamicMember ( string memberName ) : object
memberName string Name of the member.
Результат object

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

Provides the default implementation for operations that get instance as defined by GetInstanceForDynamicMember. Classes derived from the T:ImpromptuInterface.ImpromptuObject class can override this method to specify dynamic behavior for operations such as getting a value for a property.
public TryGetMember ( System binder, object &result ) : bool
binder System Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member on which the dynamic operation is performed. For example, for the Console.WriteLine(sampleObject.SampleProperty) statement, where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive.
result object The result of the get operation. For example, if the method is called for a property, you can assign the property value to .
Результат bool

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

Provides the implementation for operations that invoke a member. Classes derived from the T:System.Dynamic.DynamicObject class can override this method to specify dynamic behavior for operations such as calling a method.
public TryInvokeMember ( System binder, object args, object &result ) : bool
binder System Provides information about the dynamic operation. The binder.Name property provides the name of the member on which the dynamic operation is performed. For example, for the statement sampleObject.SampleMethod(100), where sampleObject is an instance of the class derived from the class, binder.Name returns "SampleMethod". The binder.IgnoreCase property specifies whether the member name is case-sensitive.
args object The arguments that are passed to the object member during the invoke operation. For example, for the statement sampleObject.SampleMethod(100), where sampleObject is derived from the class, [0] is equal to 100.
result object The result of the member invocation.
Результат bool