1 write to Context
Microsoft.Maui.Controls.Build.Tasks (1)
CreateObjectVisitor.cs (1)
18
Context
= context;
77 references to Context
Microsoft.Maui.Controls.Build.Tasks (77)
CreateObjectVisitor.cs (77)
34
var parentVar =
Context
.Variables[(IElementNode)node];
41
Context
.Values[node] = node.Value;
51
var typeref = Module.ImportReference(node.XmlType.GetTypeReference(
Context
.Cache, Module, node));
52
TypeDefinition typedef = typeref.ResolveCached(
Context
.Cache);
56
var visitor = new SetPropertiesVisitor(
Context
);
69
var il = new ArrayExtension().ProvideValue(node, Module,
Context
, out typeref);
71
Context
.Variables[node] = vardef;
72
Context
.Body.Variables.Add(vardef);
74
Context
.IL.Append(il);
75
Context
.IL.Emit(OpCodes.Stloc, vardef);
89
Context
.Variables[node] = vardef;
90
Context
.Body.Variables.Add(vardef);
92
Context
.IL.Append(PushValueFromLanguagePrimitive(typedef, node));
93
Context
.IL.Emit(Stloc, vardef);
99
.GetCustomAttribute(
Context
.Cache, Module, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "ProvideCompiledAttribute"))
108
var il = markupProvider.ProvideValue(node, Module,
Context
, out typeref);
112
Context
.Variables[node] = vardef;
113
Context
.Body.Variables.Add(vardef);
115
Context
.IL.Append(il);
116
Context
.IL.Emit(Stloc, vardef);
134
factoryCtorInfo = typedef.AllMethods(
Context
.Cache).FirstOrDefault(md => md.methodDef.IsConstructor &&
137
md.methodDef.MatchXArguments(node, typeref, Module,
Context
)).methodDef;
140
Context
.IL.Append(PushCtorXArguments(factoryCtorInfo.ResolveGenericParameters(typeref, Module), node));
145
factoryMethodInfo = typedef.AllMethods(
Context
.Cache).FirstOrDefault(md => !md.methodDef.IsConstructor &&
148
md.methodDef.MatchXArguments(node, typeref, Module,
Context
)).methodDef;
152
Context
.IL.Append(PushCtorXArguments(factoryMethodInfo.ResolveGenericParameters(typeref, Module), node));
171
Context
.IL.Append(PushCtorArguments(parameterizedCtorInfo.ResolveGenericParameters(typeref, Module), node));
198
Context
.Variables[node] = vardef;
199
Context
.Body.Variables.Add(vardef);
206
Context
.IL.Append(vnode.PushConvertedValue(
Context
, typeref, [typedef],
207
(requiredServices) => node.PushServiceProvider(
Context
, requiredServices),
209
Context
.IL.Emit(OpCodes.Stloc, vardef);
216
Context
.IL.Emit(OpCodes.Ldstr, ((ValueNode)(node.CollectionItems.First())).Value as string);
217
Context
.IL.Emit(OpCodes.Call, implicitOperator);
218
Context
.IL.Emit(OpCodes.Stloc, vardef);
222
Context
.IL.Emit(OpCodes.Call, Module.ImportReference(factorymethodinforef));
223
Context
.IL.Emit(OpCodes.Stloc, vardef);
230
Context
.IL.Emit(OpCodes.Newobj, ctor);
231
Context
.IL.Emit(OpCodes.Stloc, vardef);
234
!node.Properties.ContainsKey(XmlName.xFactoryMethod) && ctorInfo.MatchXArguments(node, typeref, Module,
Context
))
241
Context
.IL.Emit(OpCodes.Ldloca, vardef);
242
Context
.IL.Append(PushCtorXArguments(ctor, node));
243
Context
.IL.Emit(OpCodes.Call, ctor);
249
Context
.IL.Emit(OpCodes.Ldloca, vardef);
250
Context
.IL.Emit(OpCodes.Initobj, Module.ImportReference(typedef));
263
Context
.Variables[node] = vardef;
264
Context
.Root = vardef;
265
Context
.Body.Variables.Add(vardef);
266
Context
.IL.Emit(OpCodes.Ldarg_0);
267
Context
.IL.Emit(OpCodes.Stloc, vardef);
309
if (node is IElementNode && (vardef =
Context
.Variables[node as IElementNode]) != null)
310
foreach (var instruction in vardef.LoadAs(
Context
.Cache, parameter.ParameterType.ResolveGenericParameters(ctorinfo), Module))
314
foreach (var instruction in vnode.PushConvertedValue(
Context
,
316
[parameter, parameter.ParameterType.ResolveCached(
Context
.Cache)],
317
(requiredServices) => enode.PushServiceProvider(
Context
, requiredServices),
347
if (arg is IElementNode && (vardef =
Context
.Variables[arg as IElementNode]) != null)
348
foreach (var instruction in vardef.LoadAs(
Context
.Cache, parameter.ParameterType.ResolveGenericParameters(factoryCtorInfo), Module))
352
foreach (var instruction in vnode.PushConvertedValue(
Context
,
354
[parameter, parameter.ParameterType.ResolveCached(
Context
.Cache)],
355
(requiredServices) => enode.PushServiceProvider(
Context
, requiredServices),
394
var module =
Context
.Body.Method.Module;
459
module.TypeSystem.Object.ResolveCached(
Context
.Cache)
474
var vardef = new VariableDefinition(module.ImportReference(
Context
.Cache, ("mscorlib", "System", "Decimal")));
475
Context
.Body.Variables.Add(vardef);
485
yield return Create(Call, module.ImportPropertyGetterReference(
Context
.Cache, ("mscorlib", "System.Globalization", "CultureInfo"),
489
yield return Create(Call, module.ImportMethodReference(
Context
.Cache, ("mscorlib", "System", "Decimal"),
504
yield return Create(Newobj, module.ImportCtorReference(
Context
.Cache, ("mscorlib", "System", "Decimal"), parameterTypes: new[] { ("mscorlib", "System", "Int32") }));
522
var vardef = new VariableDefinition(module.ImportReference(
Context
.Cache, ("mscorlib", "System", "TimeSpan")));
523
Context
.Body.Variables.Add(vardef);
526
yield return Create(Call, module.ImportPropertyGetterReference(
Context
.Cache, ("mscorlib", "System.Globalization", "CultureInfo"),
529
yield return Create(Call, module.ImportMethodReference(
Context
.Cache, ("mscorlib", "System", "TimeSpan"),
543
yield return Create(Newobj, module.ImportCtorReference(
Context
.Cache, ("mscorlib", "System", "TimeSpan"), parameterTypes: new[] { ("mscorlib", "System", "Int64") }));
549
var vardef = new VariableDefinition(module.ImportReference(
Context
.Cache, ("System", "System", "Uri")));
550
Context
.Body.Variables.Add(vardef);
555
yield return Create(Call, module.ImportMethodReference(
Context
.Cache, ("System", "System", "Uri"),
570
var defaultCtor = module.ImportCtorReference(
Context
.Cache, typedef, parameterTypes: null);