72 references to Context
illink (72)
Linker.Steps\AddBypassNGenStep.cs (1)
21
coreLibAssembly =
Context
.Resolve (assembly.MainModule.TypeSystem.CoreLibrary);
Linker.Steps\BaseStep.cs (3)
51
get { return
Context
.Annotations; }
55
get { return
Context
.Tracer; }
58
public MarkingHelpers MarkingHelpers =>
Context
.MarkingHelpers;
Linker.Steps\BodySubstituterStep.cs (2)
17
new BodySubstitutionParser (
Context
, _documentStream, _xmlDocumentLocation).Parse (
Context
.Annotations.MemberActions.PrimarySubstitutionInfo);
Linker.Steps\CodeRewriterStep.cs (7)
91
Context
.Annotations.TryGetFieldUserValue (field, out object? value);
93
var valueInstr = CreateConstantResultInstruction (
Context
, field.FieldType, value);
142
ctor = Assembly.MainModule.ImportReference (
Context
.MarkedKnownMembers.ObjectCtor);
149
ctor =
Context
.MarkedKnownMembers.NotSupportedExceptionCtorString;
170
var baseType =
Context
.Resolve (method.DeclaringType.BaseType);
174
MethodReference base_ctor = baseType.GetDefaultInstanceConstructor (
Context
);
188
var instruction = CreateConstantResultInstruction (
Context
, method);
Linker.Steps\LinkAttributesStep.cs (2)
17
new LinkAttributesParser (
Context
, _documentStream, _xmlDocumentLocation).Parse (
Context
.CustomAttributes.PrimaryAttributeInfo);
Linker.Steps\OutputStep.cs (16)
54
return
Context
.ErrorsCount == 0;
66
if (
Context
.AssemblyListFile != null) {
67
using (var w = File.CreateText (
Context
.AssemblyListFile)) {
75
if (Directory.Exists (
Context
.OutputDirectory))
78
Directory.CreateDirectory (
Context
.OutputDirectory);
113
string directory =
Context
.OutputDirectory;
118
Context
.LogMessage ($"Output action: '{action,8}' assembly: '{assembly}'.");
146
if (
Context
.PInvokesListFile == null)
149
using (var fs = File.Open (Path.Combine (
Context
.OutputDirectory,
Context
.PInvokesListFile), FileMode.Create)) {
150
var values =
Context
.PInvokes.Distinct ().OrderBy (l => l);
178
DeterministicMvid =
Context
.DeterministicOutput
181
if (!
Context
.LinkSymbols)
192
parameters.SymbolWriterProvider = new CustomSymbolWriterProvider (
Context
.PreserveSymbolPaths);
244
return new FileInfo (
Context
.GetAssemblyLocation (assembly));
257
if (!
Context
.LinkSymbols)
Linker.Steps\OutputWarningSuppressions.cs (5)
12
return
Context
.WarningSuppressionWriter?.IsEmpty == false;
18
Context
.WarningSuppressionWriter?.OutputSuppressions (
Context
.OutputDirectory);
23
if (Directory.Exists (
Context
.OutputDirectory))
26
Directory.CreateDirectory (
Context
.OutputDirectory);
Linker.Steps\ProcessReferencesStep.cs (6)
39
var assembly =
Context
.TryResolve (assemblyName);
41
Context
.LogError (null, DiagnosticId.ReferenceAssemblyCouldNotBeLoaded, assemblyPath);
55
foreach (var referencePath in
Context
.Resolver.GetReferencePaths ()) {
69
if (
Context
.Actions.TryGetValue (assemblyName, out AssemblyAction action))
72
return IsFullyPreservedAction (
Context
.DefaultAction) || IsFullyPreservedAction (
Context
.TrimAction);
Linker.Steps\ProcessWarningsStep.cs (1)
12
Context
.FlushCachedWarnings ();
Linker.Steps\ReflectionBlockedStep.cs (1)
70
MethodReference ctor =
Context
.MarkedKnownMembers.DisablePrivateReflectionAttributeCtor ?? throw new InvalidOperationException ();
Linker.Steps\ResolveFromXmlStep.cs (1)
47
new DescriptorMarker (
Context
, _documentStream, _xmlDocumentLocation).Mark ();
Linker.Steps\RootAssemblyInputStep.cs (13)
30
AssemblyAction action =
Context
.Annotations.GetAction (assembly);
40
Context
.LogError (null, DiagnosticId.RootAssemblyCannotUseAction, assembly.Name.ToString (), action.ToString ());
48
Context
.LogError (null, DiagnosticId.RootAssemblyDoesNotHaveEntryPoint, assembly.Name.ToString ());
72
Context
.Optimizations.Disable (
85
Context
.DisableEventSourceSpecialHandling = false;
88
Context
.MetadataTrimming = MetadataTrimming.None;
102
assembly =
Context
.Resolver.GetAssembly (fileName);
103
Context
.Resolver.CacheAssembly (assembly);
110
assembly =
Context
.TryResolve (fileName);
112
Context
.LogError (null, DiagnosticId.RootAssemblyCouldNotBeFound, fileName);
171
Context
.Annotations.Mark (type, di, origin);
172
Context
.Annotations.Mark (assembly.MainModule, di, origin);
190
Context
.Annotations.Mark (attribute, new DependencyInfo (DependencyKind.RootAssembly, assembly));
Linker.Steps\SealerStep.cs (4)
21
if (!
Context
.CanApplyOptimization (CodeOptimizations.Sealer, assembly))
37
foreach (var a in
Context
.GetAssemblies ()) {
46
var btd =
Context
.TryResolve (t.BaseType);
58
var bt =
Context
.TryResolve (type);
Linker.Steps\SweepStep.cs (7)
121
AssemblyDefinition? ad =
Context
.Resolver.Resolve (reference);
255
return (
Context
.MetadataTrimming & metadataTrimming) != 0 && !Annotations.IsReflectionUsed (member);
368
TypeDefinition? attributeType =
Context
.TryResolve (attr.AttributeType);
391
var baseDefinition =
Context
.TryResolve (definition.BaseType);
471
|| (ov.DeclaringType.IsInterface && !MarkStep.IsInterfaceImplementationMarkedRecursively (method.DeclaringType, ov.DeclaringType,
Context
)))
484
AssemblyDefinition? assembly =
Context
.Resolve (scope);
586
var arc = new AssemblyReferencesCorrector (assembly, walkSymbols:
Context
.LinkSymbols);
Linker.Steps\ValidateVirtualMethodAnnotationsStep.cs (3)
14
var annotations =
Context
.Annotations;
44
var annotations =
Context
.Annotations;
57
Context
.LogWarning (origin, DiagnosticId.RequiresUnreferencedCodeAttributeMismatch, message);