1 write to _context
illink (1)
Linker.Dataflow\FlowAnnotations.cs (1)
26
_context
= context;
38 references to _context
illink (38)
Linker.Dataflow\FlowAnnotations.cs (38)
32
if (
_context
.TryResolve (methodRef) is not MethodDefinition method)
50
if (
_context
.TryResolve (param.Method.Method) is not MethodDefinition methodDef)
62
if (
_context
.TryResolve (methodRef) is not MethodDefinition method)
73
if (
_context
.TryResolve (fieldRef) is not FieldDefinition field)
94
TypeDefinition? declaringType =
_context
.Resolve (genericParameter.DeclaringType);
102
MethodDefinition? declaringMethod =
_context
.Resolve (genericParameter.DeclaringMethod);
175
TypeDefinition? type = typeReference.ResolveToTypeDefinition (
_context
);
200
if (!
_context
.CustomAttributes.HasAny (provider))
202
foreach (var attribute in
_context
.CustomAttributes.GetCustomAttributes (provider)) {
208
_context
.LogWarning (member, DiagnosticId.AttributeDoesntHaveTheRequiredNumberOfParameters, "System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute");
230
_context
.LogWarning (field, DiagnosticId.DynamicallyAccessedMembersOnFieldCanOnlyApplyToTypesOrStrings, field.GetDisplayName ());
248
_context
.LogWarning (method, DiagnosticId.DynamicallyAccessedMembersIsNotAllowedOnMethods);
258
_context
.LogWarning (method, DiagnosticId.DynamicallyAccessedMembersIsNotAllowedOnMethods);
260
_context
.LogWarning (method, DiagnosticId.DynamicallyAccessedMembersOnMethodParameterCanOnlyApplyToTypesOrStrings,
271
_context
.LogWarning (method, DiagnosticId.DynamicallyAccessedMembersOnMethodReturnValueCanOnlyApplyToTypesOrStrings, method.GetDisplayName ());
313
_context
.LogWarning (property, DiagnosticId.DynamicallyAccessedMembersOnPropertyCanOnlyApplyToTypesOrStrings, property.GetDisplayName ());
340
_context
.LogWarning (setMethod, DiagnosticId.DynamicallyAccessedMembersConflictsBetweenPropertyAndAccessor, property.GetDisplayName (), setMethod.GetDisplayName ());
378
_context
.LogWarning (getMethod, DiagnosticId.DynamicallyAccessedMembersConflictsBetweenPropertyAndAccessor, property.GetDisplayName (), getMethod.GetDisplayName ());
390
_context
.LogWarning (property, DiagnosticId.DynamicallyAccessedMembersCouldNotFindBackingField, property.GetDisplayName ());
398
_context
.LogWarning (backingField, DiagnosticId.DynamicallyAccessedMembersOnPropertyConflictsWithBackingField, property.GetDisplayName (), backingField.GetDisplayName ());
427
var attrs =
_context
.CompilerGeneratedState.GetGeneratedTypeAttributes (typeDef);
440
foreach (Instruction instruction in
_context
.GetMethodIL (body).Instructions) {
466
found =
_context
.Resolve (foundReference);
570
_context
.LogWarning (origin, DiagnosticId.DynamicallyAccessedMembersMismatchOnMethodParameterBetweenOverrides,
575
_context
.LogWarning (origin, DiagnosticId.DynamicallyAccessedMembersMismatchOnMethodReturnValueBetweenOverrides,
580
_context
.LogWarning (origin, DiagnosticId.DynamicallyAccessedMembersMismatchOnImplicitThisBetweenOverrides,
585
_context
.LogWarning (origin, DiagnosticId.DynamicallyAccessedMembersMismatchOnGenericParameterBetweenOverrides,
714
=> MethodReturnValue.Create (method, isNewObj, dynamicallyAccessedMemberTypes,
_context
);
730
=> new (param.ParameterType, param, dynamicallyAccessedMemberTypes,
_context
);
741
return new MethodParameterValue (method.Method.DeclaringType, new ParameterProxy (method, (ParameterIndex) 0), dynamicallyAccessedMemberTypes,
_context
);
759
_ => new FieldValue (field, GetFieldAnnotation (field),
_context
)
768
} else if (genericArgument.ResolveToTypeDefinition (
_context
) is TypeDefinition genericArgumentType) {
773
return new NullableValueWithDynamicallyAccessedMembers (new (genericArgumentType,
_context
),
774
new GenericParameterValue (gp,
_context
.Annotations.FlowAnnotations.GetGenericParameterAnnotation (gp)));
777
if (underlyingType.ResolveToTypeDefinition (
_context
) is TypeDefinition underlyingTypeDefinition)
778
return new NullableSystemTypeValue (new (genericArgumentType,
_context
), new SystemTypeValue (new (underlyingTypeDefinition,
_context
)));
784
return new SystemTypeValue (new (genericArgumentType,
_context
));