1 implementation of IFieldReferenceOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5343internal sealed partial class FieldReferenceOperation : BaseMemberReferenceOperation, IFieldReferenceOperation
78 references to IFieldReferenceOperation
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (1)
109IFieldReferenceOperation f => f.Field.Type,
ILLink.RoslynAnalyzer (9)
DataFlow\LocalDataFlowVisitor.cs (3)
131 public abstract TValue GetFieldTargetValue (IFieldSymbol field, IFieldReferenceOperation fieldReferenceOperation, in TContext context); 241 case IFieldReferenceOperation: 245 IFieldReferenceOperation fieldRef => GetFieldTargetValue (fieldRef.Field, fieldRef, in current.Context),
IOperationExtensions.cs (1)
265 case IFieldReferenceOperation:
RequiresAnalyzerBase.cs (1)
215 case IFieldReferenceOperation when targets.HasFlag (DiagnosticTargets.Field):
TrimAnalysis\TrimAnalysisFieldAccessPattern.cs (2)
16 public IFieldReferenceOperation Operation { get; init; } 22 IFieldReferenceOperation operation,
TrimAnalysis\TrimAnalysisVisitor.cs (2)
155 public override MultiValue VisitFieldReference (IFieldReferenceOperation fieldRef, StateValue state) 218 public override MultiValue GetFieldTargetValue (IFieldSymbol field, IFieldReferenceOperation fieldReferenceOperation, in FeatureContext featureContext)
Microsoft.Analyzers.Extra (3)
CallAnalysis\Fixers\LegacyLoggingFixer.FixDetails.cs (1)
113case IFieldReferenceOperation fieldRef:
ConditionalAccessAnalyzer.cs (2)
54var fieldRef = (IFieldReferenceOperation)op.Operation;
Microsoft.AspNetCore.Components.Analyzers (1)
InternalUsageAnalyzer.cs (1)
65IFieldReferenceOperation field => field.Member,
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
InternalUsageAnalyzer.cs (1)
65IFieldReferenceOperation field => field.Member,
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\InvocationOperationExtensions.cs (1)
88IFieldReferenceOperation { Field.IsReadOnly: true } f when ResolveDeclarationOperation(f.Field, semanticModel) is IOperation op =>
Microsoft.CodeAnalysis (8)
Generated\OperationKind.Generated.cs (1)
69/// <summary>Indicates an <see cref="IFieldReferenceOperation"/>.</summary>
Generated\Operations.Generated.cs (3)
10921public override IOperation VisitFieldReference(IFieldReferenceOperation operation, object? argument) 11441public virtual void VisitFieldReference(IFieldReferenceOperation operation) => DefaultVisit(operation); 11580public virtual TResult? VisitFieldReference(IFieldReferenceOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraphBuilder.cs (4)
6231var fieldReference = (IFieldReferenceOperation)originalTarget; 6285or IFieldReferenceOperation 7124public override IOperation VisitFieldReference(IFieldReferenceOperation operation, int? captureIdForResult)
Microsoft.CodeAnalysis.CodeStyle (9)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (1)
172if (operation is IFieldReferenceOperation fieldReference)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (3)
97var fieldReference = (IFieldReferenceOperation)operationContext.Operation; 243private static bool IsFieldWrite(IFieldReferenceOperation fieldReference, ISymbol owningSymbol)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (2)
675var fieldReference = (IFieldReferenceOperation)assignmentValue;
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
520if (operation is not IFieldReferenceOperation
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (2)
47var fieldReferenceOperation = (IFieldReferenceOperation)context.Operation;
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
290if (operation is IFieldReferenceOperation { Field.IsReadOnly: false } fieldReference &&
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (2)
171var fieldReferenceOperation = (IFieldReferenceOperation)context.Operation;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1111return operation is IFieldReferenceOperation or IArrayElementReferenceOperation;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
246IFieldReferenceOperation 447IFieldReferenceOperation
Microsoft.CodeAnalysis.CSharp.Features (5)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
290if (operation is IFieldReferenceOperation { Field.IsReadOnly: false } fieldReference &&
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (2)
171var fieldReferenceOperation = (IFieldReferenceOperation)context.Operation;
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
246IFieldReferenceOperation 447IFieldReferenceOperation
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (4)
IOperation\IOperationTests.cs (2)
563var fieldOperation = (IFieldReferenceOperation)operation;
IOperation\IOperationTests_IFieldReferenceExpression.cs (2)
713var fieldReferenceOperation = methodBlockOperation.Descendants().OfType<IFieldReferenceOperation>().Single();
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1111return operation is IFieldReferenceOperation or IArrayElementReferenceOperation;
Microsoft.CodeAnalysis.Features (12)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (1)
172if (operation is IFieldReferenceOperation fieldReference)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (3)
97var fieldReference = (IFieldReferenceOperation)operationContext.Operation; 243private static bool IsFieldWrite(IFieldReferenceOperation fieldReference, ISymbol owningSymbol)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.BlockAnalyzer.cs (2)
675var fieldReference = (IFieldReferenceOperation)assignmentValue;
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
520if (operation is not IFieldReferenceOperation
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (2)
47var fieldReferenceOperation = (IFieldReferenceOperation)context.Operation;
ValueTracking\ValueTracker.OperationCollector.cs (3)
34IFieldReferenceOperation or 115IFieldReferenceOperation or 145IFieldReferenceOperation fieldReferenceOperation => AddOperationAsync(operation, fieldReferenceOperation.Member, cancellationToken),
Microsoft.CodeAnalysis.Test.Utilities (14)
Compilation\OperationTreeVerifier.cs (2)
1062public override void VisitFieldReference(IFieldReferenceOperation operation) 1064LogString(nameof(IFieldReferenceOperation));
Compilation\TestOperationVisitor.cs (1)
679public override void VisitFieldReference(IFieldReferenceOperation operation)
Diagnostics\CommonDiagnosticAnalyzers.cs (4)
1425foreach (var operation in operationBlock.DescendantsAndSelf().OfType<IFieldReferenceOperation>()) 1440AnalyzerFieldReferenceOperation((IFieldReferenceOperation)operationAnalysisContext.Operation, operationAnalysisContext.ReportDiagnostic); 1443private static void AnalyzerFieldReferenceOperation(IFieldReferenceOperation operation, Action<Diagnostic> reportDiagnostic)
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (1)
247IFieldSymbol targetField = ((IFieldReferenceOperation)target).Field;
Diagnostics\FieldCouldBeReadOnlyAnalyzer.cs (2)
115IFieldReferenceOperation fieldReference = (IFieldReferenceOperation)target;
Diagnostics\LocalCouldBeConstAnalyzer.cs (2)
125IFieldReferenceOperation fieldReference = (IFieldReferenceOperation)target;
Diagnostics\OperationTestAnalyzer.cs (2)
1384memberSymbol = ((IFieldReferenceOperation)operation).Field; 1385receiver = ((IFieldReferenceOperation)operation).Instance;
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (1)
689if (marshalModeArgument.Value is not IFieldReferenceOperation { ConstantValue.Value: var marshalMode }
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (1)
IOperation\IOperationTests.vb (1)
871Dim fieldOperation = DirectCast(operation, IFieldReferenceOperation)
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
294else if (argument.Value is IFieldReferenceOperation fieldReferenceOperation &&