mscorlib(4.0.0.0) API with additions
InvokeMemberBinder.cs
1 using System.Dynamic.Utils;
2 
3 namespace System.Dynamic
4 {
6  [global::__DynamicallyInvokable]
8  {
9  private readonly string _name;
10 
11  private readonly bool _ignoreCase;
12 
13  private readonly CallInfo _callInfo;
14 
17  [global::__DynamicallyInvokable]
18  public sealed override Type ReturnType
19  {
20  [global::__DynamicallyInvokable]
21  get
22  {
23  return typeof(object);
24  }
25  }
26 
29  [global::__DynamicallyInvokable]
30  public string Name
31  {
32  [global::__DynamicallyInvokable]
33  get
34  {
35  return _name;
36  }
37  }
38 
41  [global::__DynamicallyInvokable]
42  public bool IgnoreCase
43  {
44  [global::__DynamicallyInvokable]
45  get
46  {
47  return _ignoreCase;
48  }
49  }
50 
53  [global::__DynamicallyInvokable]
54  public CallInfo CallInfo
55  {
56  [global::__DynamicallyInvokable]
57  get
58  {
59  return _callInfo;
60  }
61  }
62 
63  internal sealed override bool IsStandardBinder => true;
64 
69  [global::__DynamicallyInvokable]
70  protected InvokeMemberBinder(string name, bool ignoreCase, CallInfo callInfo)
71  {
72  ContractUtils.RequiresNotNull(name, "name");
73  ContractUtils.RequiresNotNull(callInfo, "callInfo");
74  _name = name;
75  _ignoreCase = ignoreCase;
76  _callInfo = callInfo;
77  }
78 
83  [global::__DynamicallyInvokable]
84  public sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args)
85  {
86  ContractUtils.RequiresNotNull(target, "target");
87  ContractUtils.RequiresNotNullItems(args, "args");
88  return target.BindInvokeMember(this, args);
89  }
90 
95  [global::__DynamicallyInvokable]
97  {
98  return FallbackInvokeMember(target, args, null);
99  }
100 
106  [global::__DynamicallyInvokable]
107  public abstract DynamicMetaObject FallbackInvokeMember(DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion);
108 
114  [global::__DynamicallyInvokable]
115  public abstract DynamicMetaObject FallbackInvoke(DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion);
116  }
117 }
abstract DynamicMetaObject FallbackInvoke(DynamicMetaObject target, DynamicMetaObject[] args, DynamicMetaObject errorSuggestion)
When overridden in the derived class, performs the binding of the dynamic invoke operation if the tar...
virtual DynamicMetaObject BindInvokeMember(InvokeMemberBinder binder, DynamicMetaObject[] args)
Performs the binding of the dynamic invoke member operation.
Represents the dynamic binding and a binding logic of an object participating in the dynamic binding.
Definition: __Canon.cs:3
InvokeMemberBinder(string name, bool ignoreCase, CallInfo callInfo)
Initializes a new instance of the T:System.Dynamic.InvokeMemberBinder.
DynamicMetaObject FallbackInvokeMember(DynamicMetaObject target, DynamicMetaObject[] args)
Performs the binding of the dynamic invoke member operation if the target dynamic object cannot bind.
sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args)
Performs the binding of the dynamic invoke member operation.
sealed override Type ReturnType
The result type of the operation.
string Name
Gets the name of the member to invoke.
Represents the invoke member dynamic operation at the call site, providing the binding semantic and t...
Represents type declarations: class types, interface types, array types, value types,...
Definition: Type.cs:18
The dynamic call site binder that participates in the T:System.Dynamic.DynamicMetaObject binding prot...
Describes arguments in the dynamic binding process.
Definition: CallInfo.cs:10
bool IgnoreCase
Gets the value indicating if the string comparison should ignore the case of the member name.