1 write to Context
Microsoft.Maui.Controls.Build.Tasks (1)
SetPropertiesVisitor.cs (1)
30 Context = context;
55 references to Context
Microsoft.Maui.Controls.Build.Tasks (55)
SetPropertiesVisitor.cs (55)
44 var parentVar = Context.Variables[(IElementNode)node]; 59 if (!Context.Variables.ContainsKey((IElementNode)parentNode)) 61 var parentVar = Context.Variables[(IElementNode)parentNode]; 62 if ((contentProperty = GetContentProperty(Context.Cache, parentVar.VariableType)) != null) 68 if (TrySetRuntimeName(propertyName, Context.Variables[(IElementNode)parentNode], node)) 76 Context.IL.Append(SetPropertyValue(Context.Variables[(IElementNode)parentNode], propertyName, node, Context, node)); 100 SetDataTemplate((IElementNode)parentNode, 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); 117 Context.IL.Append(ProvideValue(vardefref, Context, Module, node, bpRef: bpRef, propertyRef: propertyRef, propertyDeclaringTypeRef: declaringTypeReference)); 121 Context.Body.Variables.Add(vardef); 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]; 139 if (CanAddToResourceDictionary(parentVar, parentVar.VariableType, node, node, Context)) 141 Context.IL.Append(parentVar.LoadAs(Context.Cache, Module.GetTypeDefinition(Context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls", "ResourceDictionary")), Module)); 142 Context.IL.Append(AddToResourceDictionary(parentVar, node, node, Context)); 144 else if ((contentProperty = GetContentProperty(Context.Cache, parentVar.VariableType)) != null) 151 Context.IL.Append(SetPropertyValue(Context.Variables[(IElementNode)parentNode], name, node, Context, node)); 154 else if (parentVar.VariableType.ImplementsInterface(Context.Cache, Module.ImportReference(Context.Cache, ("mscorlib", "System.Collections", "IEnumerable"))) 155 && parentVar.VariableType.GetMethods(Context.Cache, md => md.Name == "Add" && md.Parameters.Count == 1, Module).Any()) 158 var adderTuple = elementType.GetMethods(Context.Cache, md => md.Name == "Add" && md.Parameters.Count == 1, Module).First(); 162 Context.IL.Emit(Ldloc, parentVar); 163 Context.IL.Append(vardef.LoadAs(Context.Cache, adderRef.Parameters[0].ParameterType.ResolveGenericParameters(adderRef), Module)); 164 Context.IL.Emit(Callvirt, adderRef); 166 Context.IL.Emit(Pop); 180 var parent = Context.Variables[((IElementNode)parentNode.Parent)]; 190 Context.IL.Append(GetPropertyValue(parent, parentList.XmlName, Context, node, out propertyType)); 192 if (CanAddToResourceDictionary(parent, propertyType, node, node, Context)) 194 Context.IL.Append(AddToResourceDictionary(parent, node, node, Context)); 197 var adderTuple = propertyType.GetMethods(Context.Cache, md => md.Name == "Add" && md.Parameters.Count == 1, Module).FirstOrDefault() ?? 203 Context.IL.Append(vardef.LoadAs(Context.Cache, adderRef.Parameters[0].ParameterType.ResolveGenericParameters(adderRef), Module)); 204 Context.IL.Emit(OpCodes.Callvirt, adderRef); 206 Context.IL.Emit(OpCodes.Pop); 1878 var attributes = variableDefinition.VariableType.ResolveCached(Context.Cache) 1889 Context.IL.Append(SetPropertyValue(variableDefinition, new XmlName("", runTimeName), node, Context, node));