Type Summary
public abstract class Binder
{
// Constructors
protected Binder();
// Methods
public abstract FieldInfo BindToField(BindingFlags bindingAttr,
FieldInfo[] match, object value,
CultureInfo culture);
public abstract MethodBase BindToMethod(BindingFlags bindingAttr,
MethodBase[] match, ref object[] args,
ParameterModifier[] modifiers,
CultureInfo culture,
string[] names, out object state);
public abstract object ChangeType(object value, Type type,
CultureInfo culture);
public abstract void ReorderArgumentArray(ref object[] args,
object state);
public abstract MethodBase SelectMethod(BindingFlags bindingAttr,
MethodBase[] match, Type[] types,
ParameterModifier[] modifiers);
public abstract PropertyInfo SelectProperty(BindingFlags bindingAttr,
PropertyInfo[] match, Type returnType,
Type[] indexes,
ParameterModifier[] modifiers);
}
|
BA
This class is an example of the multilanguage influence on the CLR. We could not assume a standard set of type conversion rules when binding. For example, some languages allow a method that takes an Int32 to be called with a Byte and other languages do not. Introducing the Binder allows each language to customize its own binding rules in late-bound scenarios. |
|