C# 클래스 Microsoft.Scripting.Actions.MemberTracker

Represents a logical member of a type. The member could either be real concrete member on a type or an extension member. This seperates the "physical" members that .NET knows exist on types from the members that logically exist on a type. It also provides other abstractions above the level of .NET reflection such as MemberGroups and NamespaceTracker's. It also provides a wrapper around the reflection APIs which cannot be extended from partial trust.
파일 보기 프로젝트 열기: jschementi/iron 1 사용 예제들

공개 메소드들

메소드 설명
BindToInstance ( DynamicMetaObject instance ) : MemberTracker

Binds the member tracker to the specified instance rturning a new member tracker if binding is possible. If binding is not possible the existing member tracker will be returned. For example binding to a static field results in returning the original MemberTracker. Binding to an instance field results in a new BoundMemberTracker which will get GetBoundValue/SetBoundValue to pass the instance through.

FromMemberInfo ( MemberInfo member ) : MemberTracker
FromMemberInfo ( MemberInfo member, Type extending ) : MemberTracker
GetBoundError ( ActionBinder binder, DynamicMetaObject instance ) : ErrorInfo

Returns the error associated with accessing this member via a bound instance. A null return value indicates that the default error message should be provided by the caller.

GetError ( ActionBinder binder ) : ErrorInfo

Returns the error associated with getting the value. A null return value indicates that the default error message should be provided by the caller.

GetValue ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, ActionBinder binder, Type type ) : DynamicMetaObject

Gets the expression that creates the value. Returns null if it's an error to get the value. The caller can then call GetErrorForGet to get the correct error Expression (or null if they should provide a default).

SetValue ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, ActionBinder binder, Type type, DynamicMetaObject value ) : DynamicMetaObject

Gets an expression that assigns a value to the left hand side. Returns null if it's an error to assign to. The caller can then call GetErrorForSet to get the correct error Expression (or null if a default error should be provided).

SetValue ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, ActionBinder binder, Type type, DynamicMetaObject value, DynamicMetaObject errorSuggestion ) : DynamicMetaObject

Gets an expression that assigns a value to the left hand side. Returns null if it's an error to assign to. The caller can then call GetErrorForSet to get the correct error Expression (or null if a default error should be provided).

보호된 메소드들

메소드 설명
GetBoundValue ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, ActionBinder binder, Type type, DynamicMetaObject instance ) : DynamicMetaObject

Helper for getting values that have been bound. Called from BoundMemberTracker. Custom member trackers can override this to provide their own behaviors when bound to an instance.

SetBoundValue ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, ActionBinder binder, Type type, DynamicMetaObject value, DynamicMetaObject instance ) : DynamicMetaObject

Helper for setting values that have been bound. Called from BoundMemberTracker. Custom member trackers can override this to provide their own behaviors when bound to an instance.

SetBoundValue ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, ActionBinder binder, Type type, DynamicMetaObject value, DynamicMetaObject instance, DynamicMetaObject errorSuggestion ) : DynamicMetaObject

Helper for setting values that have been bound. Called from BoundMemberTracker. Custom member trackers can override this to provide their own behaviors when bound to an instance.

비공개 메소드들

메소드 설명
Call ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, ActionBinder binder ) : DynamicMetaObject
MemberTracker ( ) : System

메소드 상세

BindToInstance() 공개 메소드

Binds the member tracker to the specified instance rturning a new member tracker if binding is possible. If binding is not possible the existing member tracker will be returned. For example binding to a static field results in returning the original MemberTracker. Binding to an instance field results in a new BoundMemberTracker which will get GetBoundValue/SetBoundValue to pass the instance through.
public BindToInstance ( DynamicMetaObject instance ) : MemberTracker
instance System.Dynamic.DynamicMetaObject
리턴 MemberTracker

FromMemberInfo() 공개 정적인 메소드

public static FromMemberInfo ( MemberInfo member ) : MemberTracker
member System.Reflection.MemberInfo
리턴 MemberTracker

FromMemberInfo() 공개 정적인 메소드

public static FromMemberInfo ( MemberInfo member, Type extending ) : MemberTracker
member System.Reflection.MemberInfo
extending System.Type
리턴 MemberTracker

GetBoundError() 공개 메소드

Returns the error associated with accessing this member via a bound instance. A null return value indicates that the default error message should be provided by the caller.
public GetBoundError ( ActionBinder binder, DynamicMetaObject instance ) : ErrorInfo
binder ActionBinder
instance System.Dynamic.DynamicMetaObject
리턴 ErrorInfo

GetBoundValue() 보호된 메소드

Helper for getting values that have been bound. Called from BoundMemberTracker. Custom member trackers can override this to provide their own behaviors when bound to an instance.
protected GetBoundValue ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, ActionBinder binder, Type type, DynamicMetaObject instance ) : DynamicMetaObject
resolverFactory Microsoft.Scripting.Actions.Calls.OverloadResolverFactory
binder ActionBinder
type System.Type
instance System.Dynamic.DynamicMetaObject
리턴 System.Dynamic.DynamicMetaObject

GetError() 공개 메소드

Returns the error associated with getting the value. A null return value indicates that the default error message should be provided by the caller.
public GetError ( ActionBinder binder ) : ErrorInfo
binder ActionBinder
리턴 ErrorInfo

GetValue() 공개 메소드

Gets the expression that creates the value. Returns null if it's an error to get the value. The caller can then call GetErrorForGet to get the correct error Expression (or null if they should provide a default).
public GetValue ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, ActionBinder binder, Type type ) : DynamicMetaObject
resolverFactory Microsoft.Scripting.Actions.Calls.OverloadResolverFactory
binder ActionBinder
type System.Type
리턴 System.Dynamic.DynamicMetaObject

SetBoundValue() 보호된 메소드

Helper for setting values that have been bound. Called from BoundMemberTracker. Custom member trackers can override this to provide their own behaviors when bound to an instance.
protected SetBoundValue ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, ActionBinder binder, Type type, DynamicMetaObject value, DynamicMetaObject instance ) : DynamicMetaObject
resolverFactory Microsoft.Scripting.Actions.Calls.OverloadResolverFactory
binder ActionBinder
type System.Type
value System.Dynamic.DynamicMetaObject
instance System.Dynamic.DynamicMetaObject
리턴 System.Dynamic.DynamicMetaObject

SetBoundValue() 보호된 메소드

Helper for setting values that have been bound. Called from BoundMemberTracker. Custom member trackers can override this to provide their own behaviors when bound to an instance.
protected SetBoundValue ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, ActionBinder binder, Type type, DynamicMetaObject value, DynamicMetaObject instance, DynamicMetaObject errorSuggestion ) : DynamicMetaObject
resolverFactory Microsoft.Scripting.Actions.Calls.OverloadResolverFactory
binder ActionBinder
type System.Type
value System.Dynamic.DynamicMetaObject
instance System.Dynamic.DynamicMetaObject
errorSuggestion System.Dynamic.DynamicMetaObject
리턴 System.Dynamic.DynamicMetaObject

SetValue() 공개 메소드

Gets an expression that assigns a value to the left hand side. Returns null if it's an error to assign to. The caller can then call GetErrorForSet to get the correct error Expression (or null if a default error should be provided).
public SetValue ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, ActionBinder binder, Type type, DynamicMetaObject value ) : DynamicMetaObject
resolverFactory Microsoft.Scripting.Actions.Calls.OverloadResolverFactory
binder ActionBinder
type System.Type
value System.Dynamic.DynamicMetaObject
리턴 System.Dynamic.DynamicMetaObject

SetValue() 공개 메소드

Gets an expression that assigns a value to the left hand side. Returns null if it's an error to assign to. The caller can then call GetErrorForSet to get the correct error Expression (or null if a default error should be provided).
public SetValue ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, ActionBinder binder, Type type, DynamicMetaObject value, DynamicMetaObject errorSuggestion ) : DynamicMetaObject
resolverFactory Microsoft.Scripting.Actions.Calls.OverloadResolverFactory
binder ActionBinder
type System.Type
value System.Dynamic.DynamicMetaObject
errorSuggestion System.Dynamic.DynamicMetaObject
리턴 System.Dynamic.DynamicMetaObject