1 write to _context
illink (1)
Linker.Dataflow\FlowAnnotations.cs (1)
26
_context
= context;
42 references to _context
illink (42)
Linker.Dataflow\FlowAnnotations.cs (42)
32
if (
_context
.TryResolve(methodRef) is not MethodDefinition method)
47
if (type.ResolveToTypeDefinition(
_context
) is not TypeDefinition typeDefinition)
55
if (type.ResolveToTypeDefinition(
_context
) is not TypeDefinition typeDefinition)
72
if (
_context
.TryResolve(method) is not MethodDefinition methodDefinition)
80
if (
_context
.TryResolve(method) is not MethodDefinition methodDefinition)
100
if (
_context
.TryResolve(param.Method.Method) is not MethodDefinition methodDef)
112
if (
_context
.TryResolve(methodRef) is not MethodDefinition method)
123
if (
_context
.TryResolve(fieldRef) is not FieldDefinition field)
145
TypeDefinition? declaringType =
_context
.Resolve(genericParameter.DeclaringType);
154
MethodDefinition? declaringMethod =
_context
.Resolve(genericParameter.DeclaringMethod);
227
TypeDefinition? type = typeReference.ResolveToTypeDefinition(
_context
);
253
if (!
_context
.CustomAttributes.HasAny(provider))
255
foreach (var attribute in
_context
.CustomAttributes.GetCustomAttributes(provider))
262
_context
.LogWarning(member, DiagnosticId.AttributeDoesntHaveTheRequiredNumberOfParameters, "System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute");
288
_context
.LogWarning(field, DiagnosticId.DynamicallyAccessedMembersOnFieldCanOnlyApplyToTypesOrStrings, field.GetDisplayName());
309
_context
.LogWarning(method, DiagnosticId.DynamicallyAccessedMembersIsNotAllowedOnMethods);
321
_context
.LogWarning(method, DiagnosticId.DynamicallyAccessedMembersIsNotAllowedOnMethods);
323
_context
.LogWarning(method, DiagnosticId.DynamicallyAccessedMembersOnMethodParameterCanOnlyApplyToTypesOrStrings,
335
_context
.LogWarning(method, DiagnosticId.DynamicallyAccessedMembersOnMethodReturnValueCanOnlyApplyToTypesOrStrings, method.GetDisplayName());
385
_context
.LogWarning(property, DiagnosticId.DynamicallyAccessedMembersIsNotAllowedOnExtensionProperties, property.GetDisplayName());
391
_context
.LogWarning(property, DiagnosticId.DynamicallyAccessedMembersOnPropertyCanOnlyApplyToTypesOrStrings, property.GetDisplayName());
422
_context
.LogWarning(setMethod, DiagnosticId.DynamicallyAccessedMembersConflictsBetweenPropertyAndAccessor, property.GetDisplayName(), setMethod.GetDisplayName());
466
_context
.LogWarning(getMethod, DiagnosticId.DynamicallyAccessedMembersConflictsBetweenPropertyAndAccessor, property.GetDisplayName(), getMethod.GetDisplayName());
488
_context
.LogWarning(backingField, DiagnosticId.DynamicallyAccessedMembersOnPropertyConflictsWithBackingField, property.GetDisplayName(), backingField.GetDisplayName());
539
var attrs =
_context
.CompilerGeneratedState.GetGeneratedTypeAttributes(typeDef);
556
foreach (Instruction instruction in
_context
.GetMethodIL(body).Instructions)
584
var found =
_context
.Resolve(foundReference);
700
_context
.LogWarning(origin, DiagnosticId.DynamicallyAccessedMembersMismatchOnMethodParameterBetweenOverrides,
705
_context
.LogWarning(origin, DiagnosticId.DynamicallyAccessedMembersMismatchOnMethodReturnValueBetweenOverrides,
710
_context
.LogWarning(origin, DiagnosticId.DynamicallyAccessedMembersMismatchOnImplicitThisBetweenOverrides,
715
_context
.LogWarning(origin, DiagnosticId.DynamicallyAccessedMembersMismatchOnGenericParameterBetweenOverrides,
856
=> MethodReturnValue.Create(method, isNewObj, dynamicallyAccessedMemberTypes,
_context
);
872
=> new(param.ParameterType, param, dynamicallyAccessedMemberTypes,
_context
);
883
return new MethodParameterValue(method.Method.DeclaringType, new ParameterProxy(method, (ParameterIndex)0), dynamicallyAccessedMemberTypes,
_context
);
902
_ => new FieldValue(field, GetFieldAnnotation(field),
_context
)
913
else if (genericArgument.ResolveToTypeDefinition(
_context
) is TypeDefinition genericArgumentType)
921
return new NullableValueWithDynamicallyAccessedMembers(new(genericArgumentType,
_context
),
922
new GenericParameterValue(gp,
_context
.Annotations.FlowAnnotations.GetGenericParameterAnnotation(gp)));
925
if (underlyingType.ResolveToTypeDefinition(
_context
) is TypeDefinition underlyingTypeDefinition)
926
return new NullableSystemTypeValue(new(genericArgumentType,
_context
), new SystemTypeValue(new(underlyingTypeDefinition,
_context
)));
932
return new SystemTypeValue(new(genericArgumentType,
_context
));