1 write to _context
illink (1)
Linker.Steps\ProcessLinkerXmlBase.cs (1)
48
_context
= context;
52 references to _context
illink (52)
Linker.Steps\BodySubstitutionParser.cs (3)
31
bool stripSubstitutions =
_context
.IsOptimizationEnabled (CodeOptimizations.RemoveSubstitutions, _resource?.Assembly);
32
ProcessXml (stripSubstitutions,
_context
.IgnoreSubstitutions);
148
_context
.Annotations.AddResourceToRemove (assembly, resource);
Linker.Steps\DescriptorMarker.cs (15)
44
_context
.LogMessage (MessageContainer.CreateInfoMessage (origin, $"Duplicate preserve of '{memberName}'"));
49
bool stripDescriptors =
_context
.IsOptimizationEnabled (CodeOptimizations.RemoveDescriptors, _resource?.Assembly);
50
ProcessXml (stripDescriptors,
_context
.IgnoreDescriptors);
62
_context
.MarkingHelpers.MarkExportedType (exportedType, assembly.MainModule, new DependencyInfo (DependencyKind.XmlDescriptor, assembly.MainModule), GetMessageOriginForPosition (nav));
93
_context
.Annotations.Mark (type, new DependencyInfo (DependencyKind.XmlDescriptor, _xmlDocumentLocation), GetMessageOriginForPosition (nav));
94
_context
.Annotations.SetPreserve (type, TypePreserve.All);
105
_context
.MarkingHelpers.MarkExportedType (exported, assembly.MainModule, new DependencyInfo (DependencyKind.XmlDescriptor, _xmlDocumentLocation), GetMessageOriginForPosition (nav));
126
_context
.Annotations.SetPreserve (type, preserve);
136
_context
.Annotations.Mark (type, new DependencyInfo (DependencyKind.XmlDescriptor, _xmlDocumentLocation), GetMessageOriginForPosition (nav));
142
_context
.Annotations.Mark (parent, new DependencyInfo (DependencyKind.DeclaringType, currentType), GetMessageOriginForPosition (nav));
164
_context
.Annotations.Mark (field, new DependencyInfo (DependencyKind.XmlDescriptor, _xmlDocumentLocation), GetMessageOriginForPosition (nav));
172
_context
.Annotations.MarkIndirectlyCalledMethod (method);
173
_context
.Annotations.SetAction (method, MethodAction.Parse);
176
_context
.Annotations.AddPreservedMethod (type, method);
178
_context
.Annotations.Mark (method, new DependencyInfo (DependencyKind.XmlDescriptor, _xmlDocumentLocation), GetMessageOriginForPosition (nav));
Linker.Steps\LinkAttributesParser.cs (26)
35
bool stripLinkAttributes =
_context
.IsOptimizationEnabled (CodeOptimizations.RemoveLinkAttributes, _resource?.Assembly);
36
ProcessXml (stripLinkAttributes,
_context
.IgnoreLinkAttributes);
77
_context
.LogMessage ($"Assigning external custom attribute '{FormatCustomAttribute (customAttribute)}' instance to '{provider}'.");
106
if (
_context
.MarkedKnownMembers.RemoveAttributeInstancesAttributeDefinition is TypeDefinition knownTypeDef) {
110
var voidType = BCL.FindPredefinedType (WellKnownType.System_Void,
_context
);
114
var attributeType = BCL.FindPredefinedType (WellKnownType.System_Attribute,
_context
);
118
var objectType = BCL.FindPredefinedType (WellKnownType.System_Object,
_context
);
153
return
_context
.MarkedKnownMembers.RemoveAttributeInstancesAttributeDefinition = td;
191
var parameterType =
_context
.TryResolve (p.ParameterType);
192
if (parameterType == null || parameterType !=
_context
.TryResolve (args[p.MetadataIndex].Type))
257
_context
.LogError (null, DiagnosticId.CustomAttributeArgumentForTypeRequiresNestedNode, "System.Object", "argument");
261
var typedef =
_context
.TryResolve (typeref);
284
var enumType =
_context
.Resolve (typeref);
298
var diagnosticContext = new DiagnosticContext (new MessageOrigin (provider), diagnosticsEnabled: true,
_context
);
299
if (!
_context
.TypeNameResolver.TryResolveTypeName (svalue, diagnosticContext, out TypeReference? type, out _, needsAssemblyName: false)) {
300
_context
.LogError (GetMessageOriginForPosition (nav), DiagnosticId.CouldNotResolveCustomAttributeTypeValue, svalue);
323
else if (arg.Type.IsSubclassOf (elementType.Namespace, elementType.Name,
_context
)) {
326
_context
.LogError (GetMessageOriginForPosition (nav), DiagnosticId.UnexpectedAttributeArgumentType, typeref.GetDisplayName ());
337
_context
.LogError (GetMessageOriginForPosition (nav), DiagnosticId.UnexpectedAttributeArgumentType, typeref.GetDisplayName ());
347
var diagnosticContext = new DiagnosticContext (new MessageOrigin (provider), diagnosticsEnabled: true,
_context
);
348
if (!
_context
.TypeNameResolver.TryResolveTypeName (typeName, diagnosticContext, out TypeReference? typeref, out _, needsAssemblyName: false)) {
349
_context
.LogError (GetMessageOriginForPosition (nav), DiagnosticId.TypeUsedWithAttributeValueCouldNotBeFound, typeName, nav.Value);
407
_context
.LogError (null, DiagnosticId.CannotConverValueToType, value.ToString () ?? "", targetType.GetDisplayName ());
416
attributeType =
_context
.GetType (attributeFullName);
420
assembly =
_context
.TryResolve (AssemblyNameReference.Parse (assemblyName));
433
attributeType =
_context
.TryResolve (assembly, attributeFullName);
Linker.Steps\ProcessLinkerXmlBase.cs (8)
64
protected virtual bool ShouldProcessElement (XPathNavigator nav) => FeatureSettings.ShouldProcessElement (nav,
_context
, _xmlDocumentLocation);
80
_context
.Annotations.AddResourceToRemove (_resource.Value.Assembly, _resource.Value.Resource);
138
foreach (AssemblyDefinition assembly in
_context
.GetReferencedAssemblies ())
142
AssemblyDefinition? assembly = assemblyToProcess ??
_context
.TryResolve (name!);
194
protected virtual TypeDefinition? ProcessExportedType (ExportedType exported, AssemblyDefinition assembly, XPathNavigator nav) =>
_context
.TryResolve (exported);
477
_context
.LogWarning (message, warningCode, GetMessageOriginForPosition (position));
482
_context
.LogWarning (GetMessageOriginForPosition (position), id, args);
585
_context
.TryResolve (target) is TypeDefinition typeDefinition &&