1 write to Context
Microsoft.CodeAnalysis (1)
PEWriter\MetadataVisitor.cs (1)
24
this.
Context
= context;
82 references to Context
Microsoft.CodeAnalysis (82)
Emit\EditAndContinue\DeltaMetadataWriter.cs (1)
1872
var methodDef = (IMethodDefinition?)methodImplementation.ImplementingMethod.AsDefinition(this.
Context
);
PEWriter\MetadataVisitor.cs (25)
29
this.Visit(arrayTypeReference.GetElementType(
Context
));
54
IMethodReference constructor = customAttribute.Constructor(
Context
, reportDiagnostics: false);
60
this.Visit(customAttribute.GetArguments(
Context
));
62
this.Visit(customAttribute.GetNamedArguments(
Context
));
75
this.Visit(customModifier.GetModifier(
Context
));
88
this.Visit(eventDefinition.GetAccessors(
Context
));
89
this.Visit(eventDefinition.GetType(
Context
));
102
var constant = fieldDefinition.GetCompileTimeValue(
Context
);
122
this.Visit(fieldDefinition.GetType(
Context
));
164
this.Visit(genericParameter.GetAttributes(
Context
));
165
this.Visit(genericParameter.GetConstraints(
Context
));
295
this.Visit(method.GetReturnValueAttributes(
Context
));
311
this.Visit(method.GetType(
Context
));
405
this.Visit(nestedTypeReference.GetContainingType(
Context
));
441
this.Visit(parameterDefinition.GetAttributes(
Context
));
447
MetadataConstant? defaultValue = parameterDefinition.GetDefaultValue(
Context
);
461
this.Visit(parameterDefinition.GetType(
Context
));
476
this.Visit(parameterTypeInformation.GetType(
Context
));
485
this.Visit(pointerTypeReference.GetTargetType(
Context
));
492
this.Visit(functionPointerTypeReference.Signature.GetType(
Context
));
494
foreach (var param in functionPointerTypeReference.Signature.GetParameters(
Context
))
510
this.Visit(propertyDefinition.GetAccessors(
Context
));
568
this.Visit(typeMember.GetAttributes(
Context
));
577
if (typeMemberReference.AsDefinition(
Context
) == null)
579
this.Visit(typeMemberReference.GetAttributes(
Context
)); // In principle, references can have attributes that are distinct from the definitions they refer to.
PEWriter\ReferenceIndexer.cs (12)
30
Visit(module.GetSourceAssemblyAttributes(
Context
.IsRefAssembly));
33
Visit(module.GetAssemblyReferences(
Context
));
35
Visit(module.GetTopLevelTypeDefinitions(
Context
));
37
foreach (var exportedType in module.GetExportedTypes(
Context
.Diagnostics))
42
Visit(module.GetResources(
Context
));
44
Visit(module.GetFiles(
Context
));
51
var definingUnit = MetadataWriter.GetDefiningUnitReference(exportedType,
Context
);
59
definingAssembly = ((IModuleReference)definingUnit).GetContainingAssembly(
Context
);
60
if (definingAssembly != null && !ReferenceEquals(definingAssembly,
Context
.Module.GetContainingAssembly(
Context
)))
108
var body = method.GetBody(
Context
);
117
VisitImports(scope.GetUsedNamespaces(
Context
));
PEWriter\ReferenceIndexerBase.cs (43)
35
if (assemblyReference !=
Context
.Module.GetContainingAssembly(
Context
))
46
this.Visit(customModifier.GetModifier(
Context
));
53
this.Visit(eventDefinition.GetType(
Context
));
64
IUnitReference definingUnit = MetadataWriter.GetDefiningUnitReference(fieldReference.GetContainingType(
Context
),
Context
);
65
if (definingUnit != null && ReferenceEquals(definingUnit,
Context
.Module))
72
this.Visit(fieldReference.GetType(
Context
));
87
this.Visit(genericMethodInstanceReference.GetGenericArguments(
Context
));
88
this.Visit(genericMethodInstanceReference.GetGenericMethod(
Context
));
100
this.Visit(genericParameter.GetAttributes(
Context
));
101
this.VisitTypeReferencesThatNeedTokens(genericParameter.GetConstraints(
Context
));
111
ITypeReference containingType = nestedType.GetContainingType(
Context
);
116
this.Visit(nestedType.GetContainingType(
Context
));
120
this.Visit(genericTypeInstanceReference.GetGenericType(
Context
));
121
this.Visit(genericTypeInstanceReference.GetGenericArguments(
Context
));
156
IUnitReference definingUnit = MetadataWriter.GetDefiningUnitReference(methodReference.GetContainingType(
Context
),
Context
);
157
if (definingUnit != null && ReferenceEquals(definingUnit,
Context
.Module) && !methodReference.AcceptsExtraArguments)
176
this.Visit(signature.GetType(
Context
));
177
this.Visit(signature.GetParameters(
Context
));
188
if (moduleReference !=
Context
.Module)
207
var unit = namespaceTypeReference.GetUnit(
Context
);
221
assemblyReference = moduleReference.GetContainingAssembly(
Context
);
222
if (assemblyReference != null && assemblyReference !=
Context
.Module.GetContainingAssembly(
Context
))
250
this.Visit(propertyDefinition.GetType(
Context
));
273
this.Visit(typeDefinition.GetAttributes(
Context
));
275
var baseType = typeDefinition.GetBaseClass(
Context
);
283
this.Visit(typeDefinition.GetExplicitImplementationOverrides(
Context
));
289
this.VisitTypeReferencesThatNeedTokens(typeDefinition.Interfaces(
Context
));
301
this.Visit(typeDefinition.GetEvents(
Context
));
302
this.Visit(typeDefinition.GetFields(
Context
));
303
this.Visit(typeDefinition.GetMethods(
Context
));
304
this.VisitNestedTypes(typeDefinition.GetNestedTypes(
Context
));
305
this.Visit(typeDefinition.GetProperties(
Context
));
338
this.Visit(typeMemberReference.GetContainingType(
Context
));
350
ITypeReference current = arrayTypeReference.GetElementType(
Context
);
362
current = ((IArrayTypeReference)current).GetElementType(
Context
);
381
ITypeReference current = pointerTypeReference.GetTargetType(
Context
);
393
current = ((IPointerTypeReference)current).GetTargetType(
Context
);
442
INestedTypeReference unspecializedNestedTypeReference = specializedNestedTypeReference.GetUnspecializedVersion(
Context
);
457
this.Visit(nestedTypeReference.GetContainingType(
Context
));
PEWriter\TypeReferenceIndexer.cs (1)
29
this.Visit(module.GetSourceAssemblyAttributes(
Context
.IsRefAssembly));