Method | Description | |
---|---|---|
GetMember ( |
Gets the statically known member from the type with the specific name. Searches only the specified type to find the member.
|
|
GetMemberAll ( |
Gets the statically known member from the type with the specific name. Searches the entire type hierarchy to find the specified member.
|
|
GetMembers ( |
Gets all the statically known members from the specified type. Searches only the specified type to find the members. The result may include multiple resolution. It is the callers responsibility to only treat the 1st one by name as existing.
|
|
GetMembersAll ( |
Gets all the statically known members from the specified type. Searches the entire type hierarchy to get all possible members. The result may include multiple resolution. It is the callers responsibility to only treat the 1st one by name as existing.
|
Method | Description | |
---|---|---|
AllResolver ( MemberBinder binder, |
||
AreTypesCompatible ( |
Checks to see if the parameter type and the declaring type are compatible to determine if an operator is forward or reverse.
|
|
ContainsResolver ( MemberBinder binder, |
Provides an implementation of __contains__. We can pull contains from: ICollection of T which defines Contains directly IList which defines Contains directly IDictionary which defines Contains directly IDictionary of K,V which defines Contains directly IEnumerable of K which we have an InstaceOps helper for IEnumerable which we have an instance ops helper for IEnumerator of K which we have an InstanceOps helper for IEnumerator which we have an instance ops helper for String is ignored here because it defines __contains__ via extension methods already. The lookup is well ordered and not dependent upon the order of values returned by reflection.
|
|
DirResolver ( MemberBinder binder, |
||
DocResolver ( MemberBinder binder, |
||
EnsureOperatorTable ( ) : void | ||
EnterResolver ( MemberBinder binder, |
||
ExitResolver ( MemberBinder binder, |
||
FallbackInequalityResolver ( MemberBinder binder, |
Looks for an Equals overload defined on the type and if one is present binds __ne__ to an InstanceOps helper.
|
|
FilterFieldAndEvent ( MemberGroup members ) : MemberGroup |
When private binding is enabled we can have a collision between the private Event and private field backing the event. We filter this out and favor the event. This matches the v1.0 behavior of private binding.
|
|
FilterForwardReverseMethods ( string name, MemberGroup group, |
If an operator is a reverisble operator (e.g. addition) then we need to filter down to just the forward/reverse versions of the .NET method. For example consider: String.op_Multiplication(int, string) String.op_Multiplication(string, int) If this method were defined on string it defines that you can do: 2 * 'abc' or: 'abc' * 2 either of which will produce 'abcabc'. The 1st form is considered the reverse form because it is declared on string but takes a non-string for the 1st argument. The 2nd is considered the forward form because it takes a string as the 1st argument. When dynamically dispatching for 2 * 'abc' we'll first try __mul__ on int, which will fail with a string argument. Then we'll try __rmul__ on a string which will succeed and dispatch to the (int, string) overload. For multiplication in this case it's not too interesting because it's commutative. For addition this might be more interesting if, for example, we had unicode and ASCII strings. In that case Unicode strings would define addition taking both unicode and ASCII strings in both forms.
|
|
FilterSpecialNames ( MemberGroup group, string name, MemberRequestKind action ) : MemberGroup | ||
FindCastMethod ( MemberBinder binder, |
Helper to get the proper typecasting method, according to the following precedence rules: 1. Strongest (most specific) declaring type 2. Strongest (most specific) parameter type 3. Type of conversion i. Implicit ii. Explicit 4. Return type (order specified in toTypes)
|
|
FormatResolver ( MemberBinder binder, |
||
GetCastNames ( |
||
GetEnumeratorContains ( |
Helper for IEnumerable/IEnumerator __contains__
|
|
GetEqualityMethods ( |
||
GetExtensionMemberGroup ( |
||
GetInstanceOpsMethod ( |
Helper to get a MemberGroup for methods declared on InstanceOps
|
|
GetMemberGroup ( MemberBinder memberBinder, MemberRequestKind action, |
Primary worker for getting the member(s) associated with a single name. Can be called with different MemberBinder's to alter the scope of the search.
|
|
GetMethodSet ( string name, int expected ) : System.Reflection.MethodInfo[] | ||
GetResolvedMembers ( MemberBinder memberBinder, MemberRequestKind action, |
Primary worker for returning a list of all members in a type. Can be called with different MemberBinder's to alter the scope of the search.
|
|
HashResolver ( MemberBinder binder, |
Provides a resolution for __hash__, first looking for IStructuralEquatable.GetHashCode, then IValueEquality.GetValueHashCode.
|
|
IncludeOperatorMethod ( |
Filters out methods which are present on standard .NET types but shouldn't be there in Python
|
|
IsMethodDefaultMember ( |
||
IsPropertyDefaultMember ( |
||
IsPropertyWithParameters ( |
||
IsPythonRecognizedOperator ( string name ) : bool |
Checks to see if this is an operator method which Python recognizes. For example op_Comma is not recognized by Python and therefore should exposed to the user as a method that is callable by name.
|
|
IsReverseOperator ( PythonOperationKind op ) : bool | ||
IterResolver ( MemberBinder binder, |
Provides a resolution for __iter__
|
|
LengthResolver ( MemberBinder binder, |
Provides a resolution for __len__
|
|
MakeConversionResolver ( List |
Helper for creating a typecast resolver
|
|
MakeIndexerResolver ( bool set ) : Func |
Helper for creating __getitem__/__setitem__ resolvers
|
|
MakeListWithPreviousMembers ( MemberGroup group, List |
||
MakeResolverTable ( ) : MemberResolver[] |
Creates the resolver table which includes all the possible resolutions.
|
|
NewResolver ( MemberBinder binder, |
Provides a resolution for __new__. For standard .NET types __new__ resolves to their constructor. For Python types they inherit __new__ from their base class. TODO: Can we just always fallback to object.__new__? If not why not?
|
|
NextResolver ( MemberBinder binder, |
Provides a resolution for next
|
|
ProtectedOnly ( |
Filters down to include only protected methods
|
|
ReprResolver ( MemberBinder binder, |
Provides a resolution for __repr__
|
|
SerializationResolver ( MemberBinder binder, |
||
StringResolver ( MemberBinder binder, |
Provides a resolution for __str__.
|
|
TypeOverridesMethod ( MemberBinder binder, |
Helper to see if the type explicitly overrides the method. This ignores members defined on object.
|
public static GetMember ( |
||
binder | ||
action | MemberRequestKind | |
type | ||
name | string | |
return | MemberGroup |
public static GetMemberAll ( |
||
binder | ||
action | MemberRequestKind | |
type | ||
name | string | |
return | MemberGroup |
public static GetMembers ( |
||
binder | ||
action | MemberRequestKind | |
type | ||
return | IList |
public static GetMembersAll ( |
||
binder | ||
action | MemberRequestKind | |
type | ||
return | IList |