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

파일 보기 프로젝트 열기: jschementi/iron 1 사용 예제들

Private Properties

프로퍼티 타입 설명
ActionBinder System.Linq.Expressions

공개 메소드들

메소드 설명
CanConvertFrom ( Type fromType, Type toType, bool toNotNullable, NarrowingLevel level ) : bool

Determines if a conversion exists from fromType to toType at the specified narrowing level. toNotNullable is true if the target variable doesn't allow null values.

Convert ( object obj, Type toType ) : object

Converts an object at runtime into the specified type.

ConvertExpression ( Expression expr, Type toType, ConversionResultKind kind, Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory ) : Expression

Converts the provided expression to the given type. The expression is safe to evaluate multiple times.

GetAllExtensionMembers ( Type type, string name ) : MemberGroup

Gets the extension members of the given name from the provided type. Base classes are also searched for their extension members. Once any of the types in the inheritance hierarchy provide an extension member the search is stopped.

GetExtensionMembers ( Type declaringType, string name ) : MemberGroup

Gets the extension members of the given name from the provided type. Subclasses of the type and their extension members are not searched.

GetExtensionTypes ( Type t ) : IList
GetMember ( MemberRequestKind action, Type type, string name ) : MemberGroup

Gets the members that are visible from the provided type of the specified name. The default implemetnation first searches the type, then the flattened heirachy of the type, and then registered extension methods.

GetObjectTypeName ( object arg ) : string
GetTypeName ( Type t ) : string
IncludeExtensionMember ( MemberInfo member ) : bool
MakeCallExpression ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, MethodInfo method ) : DynamicMetaObject
MakeContainsGenericParametersError ( MemberTracker tracker ) : ErrorInfo
MakeConversionError ( Type toType, Expression value ) : ErrorInfo
MakeGenericAccessError ( MemberTracker info ) : ErrorInfo
MakeMissingMemberError ( Type type, DynamicMetaObject self, string name ) : ErrorInfo

Provides a way for the binder to provide a custom error message when lookup fails. Just doing this for the time being until we get a more robust error return mechanism. Deprecated, use the non-generic version instead

MakeMissingMemberErrorForAssign ( Type type, DynamicMetaObject self, string name ) : ErrorInfo
MakeMissingMemberErrorForAssignReadOnlyProperty ( Type type, DynamicMetaObject self, string name ) : ErrorInfo
MakeMissingMemberErrorForDelete ( Type type, DynamicMetaObject self, string name ) : ErrorInfo
MakeMissingMemberErrorInfo ( Type type, string name ) : ErrorInfo
MakeSetValueTypeFieldError ( Microsoft.Scripting.Actions.FieldTracker field, DynamicMetaObject instance, DynamicMetaObject value ) : ErrorInfo
MakeStaticAssignFromDerivedTypeError ( Type accessingType, DynamicMetaObject self, MemberTracker assigning, DynamicMetaObject assignedValue, Microsoft.Scripting.Actions.Calls.OverloadResolverFactory context ) : ErrorInfo

Called when a set is attempting to assign to a field or property from a derived class through the base class. The default behavior is to allow the assignment.

MakeStaticPropertyInstanceAccessError ( PropertyTracker tracker, bool isAssignment ) : ErrorInfo
MakeStaticPropertyInstanceAccessError ( PropertyTracker tracker, bool isAssignment, IList parameters ) : ErrorInfo

Creates an ErrorInfo object when a static property is accessed from an instance member. The default behavior is throw an exception indicating that static members properties be accessed via an instance. Languages can override this to customize the exception, message, or to produce an ErrorInfo object which reads or writes to the property being accessed.

PreferConvert ( Type t1, Type t2 ) : Candidate

Provides ordering for two parameter types if there is no conversion between the two parameter types.

ReturnMemberTracker ( Type type, MemberTracker memberTracker ) : DynamicMetaObject

Provides an opportunity for languages to replace all MemberTracker's with their own type. Alternatlely a language can expose MemberTracker's directly.

보호된 메소드들

메소드 설명
ActionBinder ( ) : System.Linq.Expressions

비공개 메소드들

메소드 설명
ActionBinder ( Microsoft.Scripting.Runtime.ScriptDomainManager manager ) : System.Linq.Expressions

메소드 상세

ActionBinder() 보호된 메소드

protected ActionBinder ( ) : System.Linq.Expressions
리턴 System.Linq.Expressions

CanConvertFrom() 공개 추상적인 메소드

Determines if a conversion exists from fromType to toType at the specified narrowing level. toNotNullable is true if the target variable doesn't allow null values.
public abstract CanConvertFrom ( Type fromType, Type toType, bool toNotNullable, NarrowingLevel level ) : bool
fromType System.Type
toType System.Type
toNotNullable bool
level NarrowingLevel
리턴 bool

Convert() 공개 메소드

Converts an object at runtime into the specified type.
public Convert ( object obj, Type toType ) : object
obj object
toType System.Type
리턴 object

ConvertExpression() 공개 메소드

Converts the provided expression to the given type. The expression is safe to evaluate multiple times.
public ConvertExpression ( Expression expr, Type toType, ConversionResultKind kind, Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory ) : Expression
expr Expression
toType System.Type
kind ConversionResultKind
resolverFactory Microsoft.Scripting.Actions.Calls.OverloadResolverFactory
리턴 Expression

GetAllExtensionMembers() 공개 메소드

Gets the extension members of the given name from the provided type. Base classes are also searched for their extension members. Once any of the types in the inheritance hierarchy provide an extension member the search is stopped.
public GetAllExtensionMembers ( Type type, string name ) : MemberGroup
type System.Type
name string
리턴 MemberGroup

GetExtensionMembers() 공개 메소드

Gets the extension members of the given name from the provided type. Subclasses of the type and their extension members are not searched.
public GetExtensionMembers ( Type declaringType, string name ) : MemberGroup
declaringType System.Type
name string
리턴 MemberGroup

GetExtensionTypes() 공개 메소드

public GetExtensionTypes ( Type t ) : IList
t System.Type
리턴 IList

GetMember() 공개 메소드

Gets the members that are visible from the provided type of the specified name. The default implemetnation first searches the type, then the flattened heirachy of the type, and then registered extension methods.
public GetMember ( MemberRequestKind action, Type type, string name ) : MemberGroup
action MemberRequestKind
type System.Type
name string
리턴 MemberGroup

GetObjectTypeName() 공개 메소드

public GetObjectTypeName ( object arg ) : string
arg object
리턴 string

GetTypeName() 공개 메소드

public GetTypeName ( Type t ) : string
t System.Type
리턴 string

IncludeExtensionMember() 공개 메소드

public IncludeExtensionMember ( MemberInfo member ) : bool
member System.Reflection.MemberInfo
리턴 bool

MakeCallExpression() 공개 메소드

public MakeCallExpression ( Microsoft.Scripting.Actions.Calls.OverloadResolverFactory resolverFactory, MethodInfo method ) : DynamicMetaObject
resolverFactory Microsoft.Scripting.Actions.Calls.OverloadResolverFactory
method System.Reflection.MethodInfo
리턴 System.Dynamic.DynamicMetaObject

MakeContainsGenericParametersError() 공개 메소드

public MakeContainsGenericParametersError ( MemberTracker tracker ) : ErrorInfo
tracker MemberTracker
리턴 ErrorInfo

MakeConversionError() 공개 메소드

public MakeConversionError ( Type toType, Expression value ) : ErrorInfo
toType System.Type
value Expression
리턴 ErrorInfo

MakeGenericAccessError() 공개 메소드

public MakeGenericAccessError ( MemberTracker info ) : ErrorInfo
info MemberTracker
리턴 ErrorInfo

MakeMissingMemberError() 공개 메소드

Provides a way for the binder to provide a custom error message when lookup fails. Just doing this for the time being until we get a more robust error return mechanism. Deprecated, use the non-generic version instead
public MakeMissingMemberError ( Type type, DynamicMetaObject self, string name ) : ErrorInfo
type System.Type
self System.Dynamic.DynamicMetaObject
name string
리턴 ErrorInfo

MakeMissingMemberErrorForAssign() 공개 메소드

public MakeMissingMemberErrorForAssign ( Type type, DynamicMetaObject self, string name ) : ErrorInfo
type System.Type
self System.Dynamic.DynamicMetaObject
name string
리턴 ErrorInfo

MakeMissingMemberErrorForAssignReadOnlyProperty() 공개 메소드

public MakeMissingMemberErrorForAssignReadOnlyProperty ( Type type, DynamicMetaObject self, string name ) : ErrorInfo
type System.Type
self System.Dynamic.DynamicMetaObject
name string
리턴 ErrorInfo

MakeMissingMemberErrorForDelete() 공개 메소드

public MakeMissingMemberErrorForDelete ( Type type, DynamicMetaObject self, string name ) : ErrorInfo
type System.Type
self System.Dynamic.DynamicMetaObject
name string
리턴 ErrorInfo

MakeMissingMemberErrorInfo() 공개 메소드

public MakeMissingMemberErrorInfo ( Type type, string name ) : ErrorInfo
type System.Type
name string
리턴 ErrorInfo

MakeSetValueTypeFieldError() 공개 메소드

public MakeSetValueTypeFieldError ( Microsoft.Scripting.Actions.FieldTracker field, DynamicMetaObject instance, DynamicMetaObject value ) : ErrorInfo
field Microsoft.Scripting.Actions.FieldTracker
instance System.Dynamic.DynamicMetaObject
value System.Dynamic.DynamicMetaObject
리턴 ErrorInfo

MakeStaticAssignFromDerivedTypeError() 공개 메소드

Called when a set is attempting to assign to a field or property from a derived class through the base class. The default behavior is to allow the assignment.
public MakeStaticAssignFromDerivedTypeError ( Type accessingType, DynamicMetaObject self, MemberTracker assigning, DynamicMetaObject assignedValue, Microsoft.Scripting.Actions.Calls.OverloadResolverFactory context ) : ErrorInfo
accessingType System.Type
self System.Dynamic.DynamicMetaObject
assigning MemberTracker
assignedValue System.Dynamic.DynamicMetaObject
context Microsoft.Scripting.Actions.Calls.OverloadResolverFactory
리턴 ErrorInfo

MakeStaticPropertyInstanceAccessError() 공개 메소드

public MakeStaticPropertyInstanceAccessError ( PropertyTracker tracker, bool isAssignment ) : ErrorInfo
tracker PropertyTracker
isAssignment bool
리턴 ErrorInfo

MakeStaticPropertyInstanceAccessError() 공개 메소드

Creates an ErrorInfo object when a static property is accessed from an instance member. The default behavior is throw an exception indicating that static members properties be accessed via an instance. Languages can override this to customize the exception, message, or to produce an ErrorInfo object which reads or writes to the property being accessed.
public MakeStaticPropertyInstanceAccessError ( PropertyTracker tracker, bool isAssignment, IList parameters ) : ErrorInfo
tracker PropertyTracker The static property being accessed through an instance
isAssignment bool True if the user is assigning to the property, false if the user is reading from the property
parameters IList The parameters being used to access the property. This includes the instance as the first entry, any index parameters, and the /// value being assigned as the last entry if isAssignment is true.
리턴 ErrorInfo

PreferConvert() 공개 추상적인 메소드

Provides ordering for two parameter types if there is no conversion between the two parameter types.
public abstract PreferConvert ( Type t1, Type t2 ) : Candidate
t1 System.Type
t2 System.Type
리턴 Candidate

ReturnMemberTracker() 공개 메소드

Provides an opportunity for languages to replace all MemberTracker's with their own type. Alternatlely a language can expose MemberTracker's directly.
public ReturnMemberTracker ( Type type, MemberTracker memberTracker ) : DynamicMetaObject
type System.Type Tthe type which the memberTrack was accessed from
memberTracker MemberTracker The member which is being returned to the user.
리턴 System.Dynamic.DynamicMetaObject