2 types derived from DynamicMetaObject
System.Linq.Expressions (2)
System\Dynamic\DynamicObject.cs (1)
210
private sealed class MetaDynamic :
DynamicMetaObject
System\Dynamic\ExpandoObject.cs (1)
776
private sealed class MetaExpando :
DynamicMetaObject
30 instantiations of DynamicMetaObject
Microsoft.CSharp (4)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (3)
101
return new
DynamicMetaObject
(expression, restrictions);
125
return new
DynamicMetaObject
(expression, restrictions);
134
return new
DynamicMetaObject
(
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (1)
45
var error = new
DynamicMetaObject
(System.Linq.Expressions.Expression.Throw(
Microsoft.VisualBasic.Core (13)
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (13)
338
Return New
DynamicMetaObject
(
416
Return New
DynamicMetaObject
(
503
Return New
DynamicMetaObject
(
572
Return New
DynamicMetaObject
(
641
Return New
DynamicMetaObject
(
698
Return New
DynamicMetaObject
(
757
Return New
DynamicMetaObject
(
793
Return New
DynamicMetaObject
(Expression.Constant(IDOBinder.missingMemberSentinel), IDOUtils.CreateRestrictions(target))
848
Return New
DynamicMetaObject
(Expression.Convert(fallback, ReturnType), IDOUtils.CreateRestrictions(target))
897
Return New
DynamicMetaObject
(fallback, IDOUtils.CreateRestrictions(target))
948
Return New
DynamicMetaObject
(fallback, IDOUtils.CreateRestrictions(target, value:=arg))
1013
Return New
DynamicMetaObject
(
1088
Return New
DynamicMetaObject
(
PresentationFramework-SystemCore (1)
DynamicAccessorImpl.cs (1)
234
return new
DynamicMetaObject
(
System.Linq.Expressions (12)
System\Dynamic\DynamicMetaObject.cs (1)
301
return new
DynamicMetaObject
(expression, BindingRestrictions.Empty, value);
System\Dynamic\DynamicMetaObjectBinder.cs (1)
217
return new
DynamicMetaObject
(
System\Dynamic\DynamicObject.cs (5)
574
var resultMO = new
DynamicMetaObject
(result, BindingRestrictions.Empty);
637
resultMO = new
DynamicMetaObject
(checkedConvert, resultMO.Restrictions);
645
var callDynamic = new
DynamicMetaObject
(
705
var callDynamic = new
DynamicMetaObject
(
768
var callDynamic = new
DynamicMetaObject
(
System\Dynamic\ExpandoObject.cs (5)
802
var result = new
DynamicMetaObject
(value, BindingRestrictions.Empty);
808
result = new
DynamicMetaObject
(
864
new
DynamicMetaObject
(
895
DynamicMetaObject target = new
DynamicMetaObject
(
944
return new
DynamicMetaObject
(
517 references to DynamicMetaObject
Microsoft.CSharp (83)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (12)
24
internal static
DynamicMetaObject
Bind(
27
DynamicMetaObject
[] args,
29
DynamicMetaObject
onBindingError)
39
DynamicMetaObject
o = args[index];
95
Expression expression = binder.Bind(action, parameters, args, out
DynamicMetaObject
deferredBinding);
114
DynamicMetaObject
arg0 = args[0];
147
public static void ValidateBindArgument(
DynamicMetaObject
argument, string paramName)
156
public static void ValidateBindArgument(
DynamicMetaObject
[] arguments, string paramName)
185
private static bool IsDynamicallyTypedRuntimeProxy(
DynamicMetaObject
argument, CSharpArgumentInfo info)
206
DynamicMetaObject
argument,
282
private static Type GetTypeForErrorMetaObject(ICSharpBinder action,
DynamicMetaObject
[] args)
477
internal static void ThrowIfUsingDynamicCom(
DynamicMetaObject
target)
Microsoft\CSharp\RuntimeBinder\CSharpBinaryOperationBinder.cs (5)
125
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
126
public override
DynamicMetaObject
FallbackBinaryOperation(
DynamicMetaObject
target,
DynamicMetaObject
arg,
DynamicMetaObject
errorSuggestion)
Microsoft\CSharp\RuntimeBinder\CSharpConvertBinder.cs (4)
116
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
117
public override
DynamicMetaObject
FallbackConvert(
DynamicMetaObject
target,
DynamicMetaObject
errorSuggestion)
Microsoft\CSharp\RuntimeBinder\CSharpGetIndexBinder.cs (5)
89
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
90
public override
DynamicMetaObject
FallbackGetIndex(
DynamicMetaObject
target,
DynamicMetaObject
[] indexes,
DynamicMetaObject
errorSuggestion)
Microsoft\CSharp\RuntimeBinder\CSharpGetMemberBinder.cs (4)
104
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
105
public override
DynamicMetaObject
FallbackGetMember(
DynamicMetaObject
target,
DynamicMetaObject
errorSuggestion)
Microsoft\CSharp\RuntimeBinder\CSharpInvokeBinder.cs (5)
102
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
103
public override
DynamicMetaObject
FallbackInvoke(
DynamicMetaObject
target,
DynamicMetaObject
[] args,
DynamicMetaObject
errorSuggestion)
Microsoft\CSharp\RuntimeBinder\CSharpInvokeConstructorBinder.cs (3)
86
public override
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[] args)
Microsoft\CSharp\RuntimeBinder\CSharpInvokeMemberBinder.cs (10)
115
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
116
public override
DynamicMetaObject
FallbackInvokeMember(
DynamicMetaObject
target,
DynamicMetaObject
[] args,
DynamicMetaObject
errorSuggestion)
139
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
140
public override
DynamicMetaObject
FallbackInvoke(
DynamicMetaObject
target,
DynamicMetaObject
[] args,
DynamicMetaObject
errorSuggestion)
Microsoft\CSharp\RuntimeBinder\CSharpIsEventBinder.cs (4)
84
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
85
public override
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[] args)
Microsoft\CSharp\RuntimeBinder\CSharpSetIndexBinder.cs (6)
109
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
110
public override
DynamicMetaObject
FallbackSetIndex(
DynamicMetaObject
target,
DynamicMetaObject
[] indexes,
DynamicMetaObject
value,
DynamicMetaObject
errorSuggestion)
Microsoft\CSharp\RuntimeBinder\CSharpSetMemberBinder.cs (5)
109
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
110
public override
DynamicMetaObject
FallbackSetMember(
DynamicMetaObject
target,
DynamicMetaObject
value,
DynamicMetaObject
errorSuggestion)
Microsoft\CSharp\RuntimeBinder\CSharpUnaryOperationBinder.cs (4)
109
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
110
public override
DynamicMetaObject
FallbackUnaryOperation(
DynamicMetaObject
target,
DynamicMetaObject
errorSuggestion)
Microsoft\CSharp\RuntimeBinder\DynamicDebuggerProxy.cs (6)
40
public override
DynamicMetaObject
FallbackGetMember(
DynamicMetaObject
self,
DynamicMetaObject
onBindingError)
44
var v = new List<
DynamicMetaObject
> { self };
45
var
error = new DynamicMetaObject(System.Linq.Expressions.Expression.Throw(
441
DynamicMetaObject
mo = ido.GetMetaObject(parameter);
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (10)
44
public Expression Bind(ICSharpBinder payload, Expression[] parameters,
DynamicMetaObject
[] args, out
DynamicMetaObject
deferredBinding)
73
DynamicMetaObject
[] args,
74
out
DynamicMetaObject
deferredBinding)
136
DynamicMetaObject
[] args,
138
out
DynamicMetaObject
deferredBinding)
177
DynamicMetaObject
[] newArgs = new
DynamicMetaObject
[args.Length - 1];
203
private Type GetArgumentType(ICSharpBinder p, CSharpArgumentInfo argInfo, Expression param,
DynamicMetaObject
arg, int index)
246
DynamicMetaObject
[] args)
Microsoft.VisualBasic.Core (71)
Microsoft\VisualBasic\CompilerServices\IDOBinder.vb (71)
305
ByVal target As
DynamicMetaObject
,
306
ByVal packedArgs() As
DynamicMetaObject
,
307
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
352
ByVal target As
DynamicMetaObject
,
353
ByVal packedArgs() As
DynamicMetaObject
,
354
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
384
ByVal target As
DynamicMetaObject
,
385
ByVal packedArgs() As
DynamicMetaObject
,
386
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
430
ByVal target As
DynamicMetaObject
,
431
ByVal packedArgs() As
DynamicMetaObject
,
432
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
467
ByVal target As
DynamicMetaObject
,
468
ByVal packedArgs() As
DynamicMetaObject
,
469
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
541
ByVal target As
DynamicMetaObject
,
542
ByVal packedArgs As
DynamicMetaObject
(),
543
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
610
ByVal target As
DynamicMetaObject
,
611
ByVal packedArgs As
DynamicMetaObject
(),
612
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
676
ByVal target As
DynamicMetaObject
,
677
ByVal value As
DynamicMetaObject
,
678
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
733
ByVal target As
DynamicMetaObject
,
734
ByVal value As
DynamicMetaObject
,
735
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
785
ByVal target As
DynamicMetaObject
,
786
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
830
ByVal target As
DynamicMetaObject
,
831
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
879
ByVal target As
DynamicMetaObject
,
880
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
927
ByVal target As
DynamicMetaObject
,
928
ByVal arg As
DynamicMetaObject
,
929
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
975
ByVal target As
DynamicMetaObject
,
976
ByVal packedIndexes As
DynamicMetaObject
(),
977
ByVal value As
DynamicMetaObject
,
978
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
1048
ByVal target As
DynamicMetaObject
,
1049
ByVal packedIndexes As
DynamicMetaObject
(),
1050
ByVal value As
DynamicMetaObject
,
1051
ByVal errorSuggestion As
DynamicMetaObject
) As
DynamicMetaObject
1268
ByVal packedArgs As
DynamicMetaObject
(),
1290
Dim p As
DynamicMetaObject
= packedArgs((i + positionalArgCount) Mod normalArgCount)
1296
Dim p As
DynamicMetaObject
= packedArgs(i)
1511
ByVal target As
DynamicMetaObject
,
1512
Optional ByVal args As
DynamicMetaObject
() = Nothing,
1513
Optional ByVal value As
DynamicMetaObject
= Nothing) As BindingRestrictions
1517
For Each arg As
DynamicMetaObject
In args
1527
Private Shared Function CreateRestriction(ByVal metaObject As
DynamicMetaObject
) As BindingRestrictions
1538
ByVal target As
DynamicMetaObject
,
1539
Optional ByVal args As
DynamicMetaObject
() = Nothing,
1540
Optional ByVal value As
DynamicMetaObject
= Nothing) As Boolean
1549
For Each a As
DynamicMetaObject
In args
netstandard (1)
netstandard.cs (1)
766
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Dynamic.
DynamicMetaObject
))]
PresentationFramework-SystemCore (17)
DynamicAccessorImpl.cs (17)
173
public override
DynamicMetaObject
FallbackGetMember(
DynamicMetaObject
target,
174
DynamicMetaObject
errorSuggestion)
188
public override
DynamicMetaObject
FallbackSetMember(
DynamicMetaObject
target,
189
DynamicMetaObject
value,
190
DynamicMetaObject
errorSuggestion)
204
public override
DynamicMetaObject
FallbackGetIndex(
DynamicMetaObject
target,
205
DynamicMetaObject
[] indexes,
206
DynamicMetaObject
errorSuggestion)
220
public override
DynamicMetaObject
FallbackSetIndex(
DynamicMetaObject
target,
221
DynamicMetaObject
[] indexes,
222
DynamicMetaObject
value,
223
DynamicMetaObject
errorSuggestion)
232
public static
DynamicMetaObject
ThrowExpression(string message, Type returnType)
System.Core (1)
System.Core.cs (1)
71
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Dynamic.
DynamicMetaObject
))]
System.Dynamic.Runtime (1)
System.Dynamic.Runtime.cs (1)
11
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Dynamic.
DynamicMetaObject
))]
System.Linq.Expressions (343)
System\Dynamic\BinaryOperationBinder.cs (14)
41
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
42
public
DynamicMetaObject
FallbackBinaryOperation(
DynamicMetaObject
target,
DynamicMetaObject
arg)
53
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
54
public abstract
DynamicMetaObject
FallbackBinaryOperation(
DynamicMetaObject
target,
DynamicMetaObject
arg,
DynamicMetaObject
? errorSuggestion);
61
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
62
public sealed override
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[] args)
68
var
arg0 = args[0];
System\Dynamic\BindingRestrictions.cs (6)
15
/// Represents a set of binding restrictions on the <see cref="
DynamicMetaObject
"/> under which the dynamic binding is valid.
75
internal static BindingRestrictions GetTypeRestriction(
DynamicMetaObject
obj)
118
/// Combines binding restrictions from the list of <see cref="
DynamicMetaObject
"/> instances into one set of restrictions.
120
/// <param name="contributingObjects">The list of <see cref="
DynamicMetaObject
"/> instances from which to combine restrictions.</param>
122
public static BindingRestrictions Combine(IList<
DynamicMetaObject
>? contributingObjects)
127
foreach (
DynamicMetaObject
mo in contributingObjects)
System\Dynamic\ConvertBinder.cs (11)
43
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
44
public
DynamicMetaObject
FallbackConvert(
DynamicMetaObject
target)
54
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
55
public abstract
DynamicMetaObject
FallbackConvert(
DynamicMetaObject
target,
DynamicMetaObject
? errorSuggestion);
62
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
63
public sealed override
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[]? args)
System\Dynamic\CreateInstanceBinder.cs (13)
41
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
42
public
DynamicMetaObject
FallbackCreateInstance(
DynamicMetaObject
target,
DynamicMetaObject
[] args)
53
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
54
public abstract
DynamicMetaObject
FallbackCreateInstance(
DynamicMetaObject
target,
DynamicMetaObject
[] args,
DynamicMetaObject
? errorSuggestion);
61
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
62
public sealed override
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[] args)
System\Dynamic\DeleteIndexBinder.cs (13)
41
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
42
public sealed override
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[] args)
60
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
61
public
DynamicMetaObject
FallbackDeleteIndex(
DynamicMetaObject
target,
DynamicMetaObject
[] indexes)
72
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
73
public abstract
DynamicMetaObject
FallbackDeleteIndex(
DynamicMetaObject
target,
DynamicMetaObject
[] indexes,
DynamicMetaObject
? errorSuggestion);
System\Dynamic\DeleteMemberBinder.cs (11)
48
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
49
public
DynamicMetaObject
FallbackDeleteMember(
DynamicMetaObject
target)
59
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
60
public abstract
DynamicMetaObject
FallbackDeleteMember(
DynamicMetaObject
target,
DynamicMetaObject
? errorSuggestion);
67
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
68
public sealed override
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[]? args)
System\Dynamic\DynamicMetaObject.cs (63)
17
/// Represents an empty array of type <see cref="
DynamicMetaObject
"/>. This field is read-only.
19
public static readonly
DynamicMetaObject
[] EmptyMetaObjects = Array.Empty<
DynamicMetaObject
>();
22
/// Initializes a new instance of the <see cref="
DynamicMetaObject
"/> class.
24
/// <param name="expression">The expression representing this <see cref="
DynamicMetaObject
"/> during the dynamic binding process.</param>
36
/// Initializes a new instance of the <see cref="
DynamicMetaObject
"/> class.
38
/// <param name="expression">The expression representing this <see cref="
DynamicMetaObject
"/> during the dynamic binding process.</param>
40
/// <param name="value">The runtime value represented by the <see cref="
DynamicMetaObject
"/>.</param>
52
/// The expression representing the <see cref="
DynamicMetaObject
"/> during the dynamic binding process.
62
/// The runtime value represented by this <see cref="
DynamicMetaObject
"/>.
67
/// Gets a value indicating whether the <see cref="
DynamicMetaObject
"/> has the runtime value.
72
/// Gets the <see cref="Type"/> of the runtime value or null if the <see cref="
DynamicMetaObject
"/> has no value associated with it.
97
/// Gets the limit type of the <see cref="
DynamicMetaObject
"/>.
99
/// <remarks>Represents the most specific type known about the object represented by the <see cref="
DynamicMetaObject
"/>. <see cref="RuntimeType"/> if runtime value is available, a type of the <see cref="Expression"/> otherwise.</remarks>
106
/// <returns>The new <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
107
public virtual
DynamicMetaObject
BindConvert(ConvertBinder binder)
117
/// <returns>The new <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
118
public virtual
DynamicMetaObject
BindGetMember(GetMemberBinder binder)
128
/// <param name="value">The <see cref="
DynamicMetaObject
"/> representing the value for the set member operation.</param>
129
/// <returns>The new <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
130
public virtual
DynamicMetaObject
BindSetMember(SetMemberBinder binder,
DynamicMetaObject
value)
140
/// <returns>The new <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
141
public virtual
DynamicMetaObject
BindDeleteMember(DeleteMemberBinder binder)
151
/// <param name="indexes">An array of <see cref="
DynamicMetaObject
"/> instances - indexes for the get index operation.</param>
152
/// <returns>The new <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
153
public virtual
DynamicMetaObject
BindGetIndex(GetIndexBinder binder,
DynamicMetaObject
[] indexes)
163
/// <param name="indexes">An array of <see cref="
DynamicMetaObject
"/> instances - indexes for the set index operation.</param>
164
/// <param name="value">The <see cref="
DynamicMetaObject
"/> representing the value for the set index operation.</param>
165
/// <returns>The new <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
166
public virtual
DynamicMetaObject
BindSetIndex(SetIndexBinder binder,
DynamicMetaObject
[] indexes,
DynamicMetaObject
value)
176
/// <param name="indexes">An array of <see cref="
DynamicMetaObject
"/> instances - indexes for the delete index operation.</param>
177
/// <returns>The new <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
178
public virtual
DynamicMetaObject
BindDeleteIndex(DeleteIndexBinder binder,
DynamicMetaObject
[] indexes)
188
/// <param name="args">An array of <see cref="
DynamicMetaObject
"/> instances - arguments to the invoke member operation.</param>
189
/// <returns>The new <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
190
public virtual
DynamicMetaObject
BindInvokeMember(InvokeMemberBinder binder,
DynamicMetaObject
[] args)
200
/// <param name="args">An array of <see cref="
DynamicMetaObject
"/> instances - arguments to the invoke operation.</param>
201
/// <returns>The new <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
202
public virtual
DynamicMetaObject
BindInvoke(InvokeBinder binder,
DynamicMetaObject
[] args)
212
/// <param name="args">An array of <see cref="
DynamicMetaObject
"/> instances - arguments to the create instance operation.</param>
213
/// <returns>The new <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
214
public virtual
DynamicMetaObject
BindCreateInstance(CreateInstanceBinder binder,
DynamicMetaObject
[] args)
224
/// <returns>The new <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
225
public virtual
DynamicMetaObject
BindUnaryOperation(UnaryOperationBinder binder)
235
/// <param name="arg">An instance of the <see cref="
DynamicMetaObject
"/> representing the right hand side of the binary operation.</param>
236
/// <returns>The new <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
237
public virtual
DynamicMetaObject
BindBinaryOperation(BinaryOperationBinder binder,
DynamicMetaObject
arg)
250
/// Returns the list of expressions represented by the <see cref="
DynamicMetaObject
"/> instances.
252
/// <param name="objects">An array of <see cref="
DynamicMetaObject
"/> instances to extract expressions from.</param>
254
internal static Expression[] GetExpressions(
DynamicMetaObject
[] objects)
261
DynamicMetaObject
mo = objects[i];
275
/// <param name="expression">The expression representing this <see cref="
DynamicMetaObject
"/> during the dynamic binding process.</param>
281
public static
DynamicMetaObject
Create(object value, Expression expression)
287
var
idoMetaObject = ido.GetMetaObject(expression);
System\Dynamic\DynamicMetaObjectBinder.cs (25)
16
/// The dynamic call site binder that participates in the <see cref="
DynamicMetaObject
"/> binding protocol.
20
/// as input. On the other hand, the <see cref="DynamicMetaObjectBinder"/> participates in the <see cref="
DynamicMetaObject
"/>
80
DynamicMetaObject
target =
DynamicMetaObject
.Create(args[0], parameters[0]);
81
DynamicMetaObject
[] metaArgs = CreateArgumentMetaObjects(args, parameters);
83
DynamicMetaObject
binding = Bind(target, metaArgs);
137
private static
DynamicMetaObject
[] CreateArgumentMetaObjects(object[] args, ReadOnlyCollection<ParameterExpression> parameters)
139
DynamicMetaObject
[] mos;
142
mos = new
DynamicMetaObject
[args.Length - 1];
145
mos[i - 1] =
DynamicMetaObject
.Create(args[i], parameters[i]);
150
mos =
DynamicMetaObject
.EmptyMetaObjects;
160
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
161
public abstract
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[] args);
181
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
182
public
DynamicMetaObject
Defer(
DynamicMetaObject
target, params
DynamicMetaObject
[]? args)
203
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
204
public
DynamicMetaObject
Defer(params
DynamicMetaObject
[] args)
209
private
DynamicMetaObject
MakeDeferred(BindingRestrictions rs, params
DynamicMetaObject
[] args)
211
var exprs =
DynamicMetaObject
.GetExpressions(args);
System\Dynamic\DynamicObject.cs (65)
219
public override
DynamicMetaObject
BindGetMember(GetMemberBinder binder)
227
(MetaDynamic @this, GetMemberBinder b,
DynamicMetaObject
? e) => b.FallbackGetMember(@this, e)
234
public override
DynamicMetaObject
BindSetMember(SetMemberBinder binder,
DynamicMetaObject
value)
238
DynamicMetaObject
localValue = value;
245
(MetaDynamic @this, SetMemberBinder b,
DynamicMetaObject
? e) => b.FallbackSetMember(@this, localValue, e)
252
public override
DynamicMetaObject
BindDeleteMember(DeleteMemberBinder binder)
260
(MetaDynamic @this, DeleteMemberBinder b,
DynamicMetaObject
? e) => b.FallbackDeleteMember(@this, e)
267
public override
DynamicMetaObject
BindConvert(ConvertBinder binder)
275
(MetaDynamic @this, ConvertBinder b,
DynamicMetaObject
? e) => b.FallbackConvert(@this, e)
282
public override
DynamicMetaObject
BindInvokeMember(InvokeMemberBinder binder,
DynamicMetaObject
[] args)
299
DynamicMetaObject
call = BuildCallMethodWithResult(
308
(MetaDynamic @this, GetMemberBinder ignored,
DynamicMetaObject
? e) => binder.FallbackInvoke(e!, args, null)
316
public override
DynamicMetaObject
BindCreateInstance(CreateInstanceBinder binder,
DynamicMetaObject
[] args)
320
DynamicMetaObject
[] localArgs = args;
326
(MetaDynamic @this, CreateInstanceBinder b,
DynamicMetaObject
? e) => b.FallbackCreateInstance(@this, localArgs, e)
333
public override
DynamicMetaObject
BindInvoke(InvokeBinder binder,
DynamicMetaObject
[] args)
337
DynamicMetaObject
[] localArgs = args;
343
(MetaDynamic @this, InvokeBinder b,
DynamicMetaObject
? e) => b.FallbackInvoke(@this, localArgs, e)
350
public override
DynamicMetaObject
BindBinaryOperation(BinaryOperationBinder binder,
DynamicMetaObject
arg)
354
DynamicMetaObject
localArg = arg;
360
(MetaDynamic @this, BinaryOperationBinder b,
DynamicMetaObject
? e) => b.FallbackBinaryOperation(@this, localArg, e)
367
public override
DynamicMetaObject
BindUnaryOperation(UnaryOperationBinder binder)
375
(MetaDynamic @this, UnaryOperationBinder b,
DynamicMetaObject
? e) => b.FallbackUnaryOperation(@this, e)
382
public override
DynamicMetaObject
BindGetIndex(GetIndexBinder binder,
DynamicMetaObject
[] indexes)
386
DynamicMetaObject
[] localIndexes = indexes;
392
(MetaDynamic @this, GetIndexBinder b,
DynamicMetaObject
? e) => b.FallbackGetIndex(@this, localIndexes, e)
399
public override
DynamicMetaObject
BindSetIndex(SetIndexBinder binder,
DynamicMetaObject
[] indexes,
DynamicMetaObject
value)
403
DynamicMetaObject
[] localIndexes = indexes;
404
DynamicMetaObject
localValue = value;
411
(MetaDynamic @this, SetIndexBinder b,
DynamicMetaObject
? e) => b.FallbackSetIndex(@this, localIndexes, localValue, e)
418
public override
DynamicMetaObject
BindDeleteIndex(DeleteIndexBinder binder,
DynamicMetaObject
[] indexes)
422
DynamicMetaObject
[] localIndexes = indexes;
428
(MetaDynamic @this, DeleteIndexBinder b,
DynamicMetaObject
? e) => b.FallbackDeleteIndex(@this, localIndexes, e)
435
private delegate
DynamicMetaObject
Fallback<TBinder>(MetaDynamic @this, TBinder binder,
DynamicMetaObject
? errorSuggestion);
515
private
DynamicMetaObject
CallMethodWithResult<TBinder>(MethodInfo method, TBinder binder, Expression[] args, Fallback<TBinder> fallback)
525
private
DynamicMetaObject
CallMethodWithResult<TBinder>(MethodInfo method, TBinder binder, Expression[] args, Fallback<TBinder> fallback, Fallback<TBinder>? fallbackInvoke)
532
DynamicMetaObject
fallbackResult = fallback(this, binder, null);
534
DynamicMetaObject
callDynamic = BuildCallMethodWithResult(method, binder, args, fallbackResult, fallbackInvoke);
555
private
DynamicMetaObject
BuildCallMethodWithResult<TBinder>(MethodInfo method, TBinder binder, Expression[] args,
DynamicMetaObject
fallbackResult, Fallback<TBinder>? fallbackInvoke)
574
var
resultMO = new DynamicMetaObject(result, BindingRestrictions.Empty);
645
var
callDynamic = new DynamicMetaObject(
684
private
DynamicMetaObject
CallMethodReturnLast<TBinder>(MethodInfo method, TBinder binder, Expression[] args, Expression value, Fallback<TBinder> fallback)
691
DynamicMetaObject
fallbackResult = fallback(this, binder, null);
705
var
callDynamic = new DynamicMetaObject(
753
private
DynamicMetaObject
CallMethodNoResult<TBinder>(MethodInfo method, TBinder binder, Expression[] args, Fallback<TBinder> fallback)
760
DynamicMetaObject
fallbackResult = fallback(this, binder, null);
768
var
callDynamic = new DynamicMetaObject(
868
public override
DynamicMetaObject
FallbackGetMember(
DynamicMetaObject
target,
DynamicMetaObject
? errorSuggestion)
880
/// Returns the <see cref="
DynamicMetaObject
" /> responsible for binding operations performed on this object,
885
/// The <see cref="
DynamicMetaObject
" /> to bind this object. The object can be encapsulated inside of another
886
/// <see cref="
DynamicMetaObject
"/> to provide custom behavior for individual actions.
888
public virtual
DynamicMetaObject
GetMetaObject(Expression parameter) => new MetaDynamic(parameter, this);
System\Dynamic\ExpandoObject.cs (16)
293
DynamicMetaObject
IDynamicMetaObjectProvider.GetMetaObject(Expression parameter)
783
private
DynamicMetaObject
BindGetOrInvokeMember(DynamicMetaObjectBinder binder, string name, bool ignoreCase,
DynamicMetaObject
fallback, Func<
DynamicMetaObject
,
DynamicMetaObject
>? fallbackInvoke)
802
var
result = new DynamicMetaObject(value, BindingRestrictions.Empty);
826
public override
DynamicMetaObject
BindGetMember(GetMemberBinder binder)
838
public override
DynamicMetaObject
BindInvokeMember(InvokeMemberBinder binder,
DynamicMetaObject
[] args)
850
public override
DynamicMetaObject
BindSetMember(SetMemberBinder binder,
DynamicMetaObject
value)
879
public override
DynamicMetaObject
BindDeleteMember(DeleteMemberBinder binder)
893
DynamicMetaObject
fallback = binder.FallbackDeleteMember(this);
895
DynamicMetaObject
target = new DynamicMetaObject(
921
private
DynamicMetaObject
AddDynamicTestAndDefer(DynamicMetaObjectBinder binder, ExpandoClass klass, ExpandoClass? originalClass,
DynamicMetaObject
succeeds)
System\Dynamic\GetIndexBinder.cs (13)
41
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
42
public sealed override
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[] args)
60
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
61
public
DynamicMetaObject
FallbackGetIndex(
DynamicMetaObject
target,
DynamicMetaObject
[] indexes)
72
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
73
public abstract
DynamicMetaObject
FallbackGetIndex(
DynamicMetaObject
target,
DynamicMetaObject
[] indexes,
DynamicMetaObject
? errorSuggestion);
System\Dynamic\GetMemberBinder.cs (11)
48
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
49
public
DynamicMetaObject
FallbackGetMember(
DynamicMetaObject
target)
59
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
60
public abstract
DynamicMetaObject
FallbackGetMember(
DynamicMetaObject
target,
DynamicMetaObject
? errorSuggestion);
67
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
68
public sealed override
DynamicMetaObject
Bind(
DynamicMetaObject
target, params
DynamicMetaObject
[]? args)
System\Dynamic\IDynamicMetaObjectProvider.cs (4)
13
/// and implement <see cref="GetMetaObject" /> to return a <see cref="
DynamicMetaObject
" />.
18
/// Returns the <see cref="
DynamicMetaObject
" /> responsible for binding operations performed on this object.
21
/// <returns>The <see cref="
DynamicMetaObject
" /> to bind this object.</returns>
22
DynamicMetaObject
GetMetaObject(Expression parameter);
System\Dynamic\InvokeBinder.cs (13)
41
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
42
public
DynamicMetaObject
FallbackInvoke(
DynamicMetaObject
target,
DynamicMetaObject
[] args)
53
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
54
public abstract
DynamicMetaObject
FallbackInvoke(
DynamicMetaObject
target,
DynamicMetaObject
[] args,
DynamicMetaObject
? errorSuggestion);
61
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
62
public sealed override
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[] args)
System\Dynamic\InvokeMemberBinder.cs (19)
57
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
58
public sealed override
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[] args)
76
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
77
public
DynamicMetaObject
FallbackInvokeMember(
DynamicMetaObject
target,
DynamicMetaObject
[] args)
88
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
89
public abstract
DynamicMetaObject
FallbackInvokeMember(
DynamicMetaObject
target,
DynamicMetaObject
[] args,
DynamicMetaObject
? errorSuggestion);
97
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
100
/// as a sequence of get member, and invoke, to let the <see cref="
DynamicMetaObject
"/>
103
public abstract
DynamicMetaObject
FallbackInvoke(
DynamicMetaObject
target,
DynamicMetaObject
[] args,
DynamicMetaObject
? errorSuggestion);
System\Dynamic\SetIndexBinder.cs (17)
41
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
42
public sealed override
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[] args)
48
DynamicMetaObject
value = args[args.Length - 1];
49
DynamicMetaObject
[] indexes = args.RemoveLast();
68
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
69
public
DynamicMetaObject
FallbackSetIndex(
DynamicMetaObject
target,
DynamicMetaObject
[] indexes,
DynamicMetaObject
value)
81
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
82
public abstract
DynamicMetaObject
FallbackSetIndex(
DynamicMetaObject
target,
DynamicMetaObject
[] indexes,
DynamicMetaObject
value,
DynamicMetaObject
? errorSuggestion);
System\Dynamic\SetMemberBinder.cs (14)
49
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
50
public sealed override
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[] args)
56
var
arg0 = args[0];
72
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
73
public
DynamicMetaObject
FallbackSetMember(
DynamicMetaObject
target,
DynamicMetaObject
value)
84
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
85
public abstract
DynamicMetaObject
FallbackSetMember(
DynamicMetaObject
target,
DynamicMetaObject
value,
DynamicMetaObject
? errorSuggestion);
System\Dynamic\UnaryOperationBinder.cs (11)
53
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
54
public
DynamicMetaObject
FallbackUnaryOperation(
DynamicMetaObject
target)
64
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
65
public abstract
DynamicMetaObject
FallbackUnaryOperation(
DynamicMetaObject
target,
DynamicMetaObject
? errorSuggestion);
72
/// <returns>The <see cref="
DynamicMetaObject
"/> representing the result of the binding.</returns>
73
public sealed override
DynamicMetaObject
Bind(
DynamicMetaObject
target,
DynamicMetaObject
[]? args)
System\Linq\Expressions\Compiler\DelegateHelpers.cs (4)
58
internal static Type MakeDeferredSiteDelegate(
DynamicMetaObject
[] args, Type returnType)
70
DynamicMetaObject
mo = args[i];
92
DynamicMetaObject
mo = args[i];
108
private static bool IsByRef(
DynamicMetaObject
mo)