mscorlib(4.0.0.0) API with additions
SetMemberBinder.cs
1 using System.Dynamic.Utils;
2 
3 namespace System.Dynamic
4 {
6  [global::__DynamicallyInvokable]
7  public abstract class SetMemberBinder : 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 SetMemberBinder(string name, bool ignoreCase)
56  {
57  ContractUtils.RequiresNotNull(name, "name");
58  _name = name;
59  _ignoreCase = ignoreCase;
60  }
61 
66  [global::__DynamicallyInvokable]
67  public sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args)
68  {
69  ContractUtils.RequiresNotNull(target, "target");
70  ContractUtils.RequiresNotNull(args, "args");
71  ContractUtils.Requires(args.Length == 1, "args");
72  DynamicMetaObject value = args[0];
73  ContractUtils.RequiresNotNull(value, "args");
74  return target.BindSetMember(this, value);
75  }
76 
81  [global::__DynamicallyInvokable]
83  {
84  return FallbackSetMember(target, value, null);
85  }
86 
92  [global::__DynamicallyInvokable]
93  public abstract DynamicMetaObject FallbackSetMember(DynamicMetaObject target, DynamicMetaObject value, DynamicMetaObject errorSuggestion);
94  }
95 }
bool IgnoreCase
Gets the value indicating if the string comparison should ignore the case of the member name.
DynamicMetaObject FallbackSetMember(DynamicMetaObject target, DynamicMetaObject value)
Performs the binding of the dynamic set member operation if the target dynamic object cannot bind.
Represents the dynamic binding and a binding logic of an object participating in the dynamic binding.
Represents the dynamic set member operation at the call site, providing the binding semantic and the ...
Definition: __Canon.cs:3
sealed override Type ReturnType
The result type of the operation.
string Name
Gets the name of the member to obtain.
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...
virtual DynamicMetaObject BindSetMember(SetMemberBinder binder, DynamicMetaObject value)
Performs the binding of the dynamic set member operation.
sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args)
Performs the binding of the dynamic set member operation.
SetMemberBinder(string name, bool ignoreCase)
Initializes a new instance of the T:System.Dynamic.SetMemberBinder.