mscorlib(4.0.0.0) API with additions
SetIndexBinder.cs
1 using System.Dynamic.Utils;
2 
3 namespace System.Dynamic
4 {
6  [global::__DynamicallyInvokable]
7  public abstract class SetIndexBinder : DynamicMetaObjectBinder
8  {
9  private readonly CallInfo _callInfo;
10 
13  [global::__DynamicallyInvokable]
14  public sealed override Type ReturnType
15  {
16  [global::__DynamicallyInvokable]
17  get
18  {
19  return typeof(object);
20  }
21  }
22 
25  [global::__DynamicallyInvokable]
26  public CallInfo CallInfo
27  {
28  [global::__DynamicallyInvokable]
29  get
30  {
31  return _callInfo;
32  }
33  }
34 
35  internal sealed override bool IsStandardBinder => true;
36 
39  [global::__DynamicallyInvokable]
40  protected SetIndexBinder(CallInfo callInfo)
41  {
42  ContractUtils.RequiresNotNull(callInfo, "callInfo");
43  _callInfo = callInfo;
44  }
45 
50  [global::__DynamicallyInvokable]
51  public sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args)
52  {
53  ContractUtils.RequiresNotNull(target, "target");
54  ContractUtils.RequiresNotNull(args, "args");
55  ContractUtils.Requires(args.Length >= 2, "args");
56  DynamicMetaObject value = args[args.Length - 1];
57  DynamicMetaObject[] array = args.RemoveLast();
58  ContractUtils.RequiresNotNull(value, "args");
59  ContractUtils.RequiresNotNullItems(array, "args");
60  return target.BindSetIndex(this, array, value);
61  }
62 
68  [global::__DynamicallyInvokable]
70  {
71  return FallbackSetIndex(target, indexes, value, null);
72  }
73 
80  [global::__DynamicallyInvokable]
81  public abstract DynamicMetaObject FallbackSetIndex(DynamicMetaObject target, DynamicMetaObject[] indexes, DynamicMetaObject value, DynamicMetaObject errorSuggestion);
82  }
83 }
Represents the dynamic set index operation at the call site, providing the binding semantic and the d...
SetIndexBinder(CallInfo callInfo)
Initializes a new instance of the T:System.Dynamic.SetIndexBinder.
sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args)
Performs the binding of the dynamic set index operation.
Represents the dynamic binding and a binding logic of an object participating in the dynamic binding.
Definition: __Canon.cs:3
DynamicMetaObject FallbackSetIndex(DynamicMetaObject target, DynamicMetaObject[] indexes, DynamicMetaObject value)
Performs the binding of the dynamic set index operation if the target dynamic object cannot bind.
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 BindSetIndex(SetIndexBinder binder, DynamicMetaObject[] indexes, DynamicMetaObject value)
Performs the binding of the dynamic set index operation.
Describes arguments in the dynamic binding process.
Definition: CallInfo.cs:10
sealed override Type ReturnType
The result type of the operation.