mscorlib(4.0.0.0) API with additions
GetMemberBinder.cs
1 using System.Dynamic.Utils;
2 
3 namespace System.Dynamic
4 {
6  [global::__DynamicallyInvokable]
7  public abstract class GetMemberBinder : DynamicMetaObjectBinder
8  {
9  private readonly string _name;
10 
11  private readonly bool _ignoreCase;
12 
15  [global::__DynamicallyInvokable]
16  public sealed override Type ReturnType
17  {
18  [global::__DynamicallyInvokable]
19  get
20  {
21  return typeof(object);
22  }
23  }
24 
27  [global::__DynamicallyInvokable]
28  public string Name
29  {
30  [global::__DynamicallyInvokable]
31  get
32  {
33  return _name;
34  }
35  }
36 
39  [global::__DynamicallyInvokable]
40  public bool IgnoreCase
41  {
42  [global::__DynamicallyInvokable]
43  get
44  {
45  return _ignoreCase;
46  }
47  }
48 
49  internal sealed override bool IsStandardBinder => true;
50 
54  [global::__DynamicallyInvokable]
55  protected GetMemberBinder(string name, bool ignoreCase)
56  {
57  ContractUtils.RequiresNotNull(name, "name");
58  _name = name;
59  _ignoreCase = ignoreCase;
60  }
61 
65  [global::__DynamicallyInvokable]
67  {
68  return FallbackGetMember(target, null);
69  }
70 
75  [global::__DynamicallyInvokable]
76  public abstract DynamicMetaObject FallbackGetMember(DynamicMetaObject target, DynamicMetaObject errorSuggestion);
77 
82  [global::__DynamicallyInvokable]
83  public sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args)
84  {
85  ContractUtils.RequiresNotNull(target, "target");
86  ContractUtils.Requires(args == null || args.Length == 0, "args");
87  return target.BindGetMember(this);
88  }
89  }
90 }
sealed override Type ReturnType
The result type of the operation.
Represents the dynamic get member operation at the call site, providing the binding semantic and the ...
Represents the dynamic binding and a binding logic of an object participating in the dynamic binding.
Definition: __Canon.cs:3
DynamicMetaObject FallbackGetMember(DynamicMetaObject target)
Performs the binding of the dynamic get member operation if the target dynamic object cannot bind.
virtual DynamicMetaObject BindGetMember(GetMemberBinder binder)
Performs the binding of the dynamic get member operation.
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...
bool IgnoreCase
Gets the value indicating if the string comparison should ignore the case of the member name.
sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args)
Performs the binding of the dynamic get member operation.
string Name
Gets the name of the member to obtain.
GetMemberBinder(string name, bool ignoreCase)
Initializes a new instance of the T:System.Dynamic.GetMemberBinder.