1 write to Variables
Microsoft.Maui.Controls.Build.Tasks (1)
ILContext.cs (1)
17 Variables = new Dictionary<IElementNode, VariableDefinition>();
87 references to Variables
Microsoft.Maui.Controls.Build.Tasks (87)
CompiledConverters\FontSizeTypeConverter.cs (2)
31 if (parent != null && context.Variables.ContainsKey(parent)) 33 yield return Instruction.Create(OpCodes.Ldloc, context.Variables[parent]);
CompiledConverters\RDSourceTypeConverter.cs (2)
115 foreach (var instruction in context.Variables[rdNode].LoadAs(context.Cache, currentModule.GetTypeDefinition(context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls", "ResourceDictionary")), currentModule)) 132 foreach (var instruction in context.Variables[rdNode].LoadAs(context.Cache, currentModule.GetTypeDefinition(context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls", "ResourceDictionary")), currentModule))
CompiledMarkupExtensions\ArrayExtension.cs (2)
30 var vardef = context.Variables[node]; 37 context.Variables[node] = vardef;
CompiledMarkupExtensions\StaticResourceExtension.cs (9)
34 && context.Variables.ContainsKey(irn) 38 if (context.Variables[irn].VariableType.FullName == "System.String") 45 vardefref.VariableDefinition = context.Variables[irn]; 55 && context.Variables.ContainsKey(irn2) 59 if (context.Variables[irn2].VariableType.FullName == "System.String") 66 vardefref.VariableDefinition = context.Variables[irn2]; 80 && context.Variables.ContainsKey(irn3) 84 if (context.Variables[irn3].VariableType.FullName == "System.String") 91 vardefref.VariableDefinition = context.Variables[irn3];
CompiledValueProviders\SetterValueProvider.cs (1)
69 return context.Variables[firstItem].VariableType.InheritsFromOrImplements(context.Cache, genericType);
CreateObjectVisitor.cs (8)
34 var parentVar = Context.Variables[(IElementNode)node]; 71 Context.Variables[node] = vardef; 89 Context.Variables[node] = vardef; 112 Context.Variables[node] = vardef; 198 Context.Variables[node] = vardef; 263 Context.Variables[node] = vardef; 309 if (node is IElementNode && (vardef = Context.Variables[node as IElementNode]) != null) 347 if (arg is IElementNode && (vardef = Context.Variables[arg as IElementNode]) != null)
ExpandMarkupsVisitor.cs (1)
31 var parentVar = Context.Variables[(IElementNode)node];
MethodDefinitionExtensions.cs (1)
36 var argType = context.Variables[arguments[i] as IElementNode].VariableType;
NodeILExtensions.cs (3)
476 if (en != null && context.Variables.ContainsKey(en)) 547 foreach (var instruction in context.Variables[en].LoadAs(context.Cache, module.TypeSystem.Object, module)) 674 context.Variables.TryGetValue(elementNode, out VariableDefinition variableDefinition))
SetFieldVisitor.cs (2)
24 var parentVar = Context.Variables[(IElementNode)node]; 37 Context.IL.Append(Context.Variables[(IElementNode)parentNode].LoadAs(Context.Cache, field.FieldType, Context.Module));
SetNamescopesAndRegisterNamesVisitor.cs (10)
25 var parentVar = Context.Variables[node]; 35 RegisterName((string)node.Value, Context.Scopes[node].Item1, Context.Scopes[node].Item2, Context.Variables[(IElementNode)parentNode], node); 36 SetStyleId((string)node.Value, Context.Variables[(IElementNode)parentNode]); 60 if (setNameScope && Context.Variables[node].VariableType.InheritsFromOrImplements(Context.Cache, Context.Body.Method.Module.ImportReference(Context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls", "BindableObject")))) 63 else if (Context.Variables[node].VariableType.InheritsFromOrImplements(Context.Cache, Context.Body.Method.Module.ImportReference(Context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls", "Element")))) 70 Context.IL.Append(Context.Variables[node].LoadAs(Context.Cache, module.GetTypeDefinition(Context.Cache, parameterTypes[0]), module)); 81 if (Context.Variables[node].VariableType.InheritsFromOrImplements(Context.Cache, Context.Body.Method.Module.ImportReference(Context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls", "BindableObject")))) 108 if (Context.Variables[node].VariableType.InheritsFromOrImplements(Context.Cache, Context.Body.Method.Module.ImportReference(Context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls", "BindableObject")))) 111 Context.IL.Append(Context.Variables[node].LoadAs(Context.Cache, module.GetTypeDefinition(Context.Cache, namescoperef), module)); 144 Context.IL.Append(Context.Variables[node].LoadAs(Context.Cache, module.GetTypeDefinition(Context.Cache, parameterTypes[0]), module));
SetPropertiesVisitor.cs (44)
44 var parentVar = Context.Variables[(IElementNode)node]; 59 if (!Context.Variables.ContainsKey((IElementNode)parentNode)) 61 var parentVar = Context.Variables[(IElementNode)parentNode]; 68 if (TrySetRuntimeName(propertyName, Context.Variables[(IElementNode)parentNode], node)) 76 Context.IL.Append(SetPropertyValue(Context.Variables[(IElementNode)parentNode], propertyName, node, Context, node)); 105 var vardef = Context.Variables[node]; 114 bpRef = GetBindablePropertyReference(Context.Variables[(IElementNode)parentNode], propertyName.NamespaceURI, ref localName, out _, Context, node); 115 propertyRef = Context.Variables[(IElementNode)parentNode].VariableType.GetProperty(Context.Cache, pd => pd.Name == localName, out declaringTypeReference); 122 Context.Variables[node] = vardef; 132 Context.IL.Append(SetPropertyValue(Context.Variables[(IElementNode)parentNode], propertyName, node, Context, node)); 136 var parentVar = Context.Variables[(IElementNode)parentNode]; 151 Context.IL.Append(SetPropertyValue(Context.Variables[(IElementNode)parentNode], name, node, Context, node)); 180 var parent = Context.Variables[((IElementNode)parentNode.Parent)]; 275 foreach (var instruction in context.Variables[node].LoadAs(context.Cache, markupExtension, module)) 330 foreach (var instruction in context.Variables[node].LoadAs(context.Cache, markupExtension, module)) 340 else if (context.Variables[node].VariableType.ImplementsInterface(context.Cache, module.ImportReference(context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "IMarkupExtension")))) 342 var acceptEmptyServiceProvider = context.Variables[node].VariableType.GetCustomAttribute(context.Cache, module, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "AcceptEmptyServiceProviderAttribute")) != null; 350 var compiledValueProviderName = context.Variables[node].VariableType.GetCustomAttribute(context.Cache, module, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "ProvideCompiledAttribute"))?.ConstructorArguments?[0].Value as string; 370 foreach (var instruction in context.Variables[node].LoadAs(context.Cache, module.GetTypeDefinition(context.Cache, markupExtensionType), module)) 383 else if (context.Variables[node].VariableType.ImplementsInterface(context.Cache, module.ImportReference(context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "IValueProvider")))) 385 var acceptEmptyServiceProvider = context.Variables[node].VariableType.GetCustomAttribute(context.Cache, module, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "AcceptEmptyServiceProviderAttribute")) != null; 391 var valueProviderType = context.Variables[node].VariableType; 411 foreach (var instruction in context.Variables[node].LoadAs(context.Cache, module.GetTypeDefinition(context.Cache, valueProviderInterface), module)) 1279 if (!context.Variables.TryGetValue(valueNode as IElementNode, out varValue)) 1293 foreach (var instruction in context.Variables[elementNode].LoadAs(context.Cache, module.GetTypeDefinition(context.Cache, dynamicResourceType), module)) 1314 if (!context.Variables.TryGetValue(valueNode as IElementNode, out VariableDefinition varValue)) 1336 foreach (var instruction in context.Variables[elementNode].LoadAs(context.Cache, module.GetTypeDefinition(context.Cache, parameterTypes[1]), module)) 1356 if (!context.Variables.TryGetValue(elementNode, out VariableDefinition varValue)) 1418 if (context.Variables[elementNode].VariableType.FullName == "System.Object") 1421 yield return Create(Ldloc, context.Variables[elementNode]); 1426 yield return Create(Ldloc, context.Variables[elementNode]); 1431 yield return Create(Ldloc, context.Variables[elementNode]); 1437 foreach (var instruction in context.Variables[elementNode].LoadAs(context.Cache, bpTypeRef, module)) 1443 if (context.Variables[elementNode].VariableType.FullName == "System.Object") 1497 var vardef = context.Variables[elementNode]; 1577 foreach (var instruction in context.Variables[elementNode].LoadAs(context.Cache, propertyType, module)) 1622 if (!context.Variables.TryGetValue(elementNode, out VariableDefinition varValue)) 1662 var nodeTypeRef = context.Variables[node].VariableType; 1676 var vardef = context.Variables[elementNode]; 1715 foreach (var instruction in context.Variables[node].LoadAs(context.Cache, module.TypeSystem.Object, module)) 1726 var nodeTypeRef = context.Variables[node].VariableType; 1727 yield return Create(Ldloc, context.Variables[node]); 1753 var parentVar = parentContext.Variables[parentNode]; 1842 templateIl.Append(templateContext.Variables[node].LoadAs(parentContext.Cache, module.TypeSystem.Object, module));
SetResourcesVisitor.cs (2)
46 Context.IL.Append(SetPropertiesVisitor.SetPropertyValue(Context.Variables[(IElementNode)parentNode], propertyName, node, Context, node)); 74 var parentVar = Context.Variables[(IElementNode)node];