1 implementation of Field
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5353public IFieldSymbol Field { get; }
42 references to Field
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (1)
109IFieldReferenceOperation f => f.Field.Type,
ILLink.RoslynAnalyzer (3)
DataFlow\LocalDataFlowVisitor.cs (1)
245 IFieldReferenceOperation fieldRef => GetFieldTargetValue (fieldRef.Field, fieldRef, in current.Context),
TrimAnalysis\TrimAnalysisVisitor.cs (2)
157 var field = fieldRef.Field; 175 return GetFieldTargetValue (fieldRef.Field, fieldRef, in current.Context);
Microsoft.Analyzers.Extra (2)
ConditionalAccessAnalyzer.cs (2)
55if (MaybeNull(fieldRef.Field.GetAttributes())) 60type = fieldRef.Field.Type;
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
StaticRouteHandlerModel\InvocationOperationExtensions.cs (2)
88IFieldReferenceOperation { Field.IsReadOnly: true } f when ResolveDeclarationOperation(f.Field, semanticModel) is IOperation op =>
Microsoft.CodeAnalysis (3)
Operations\ControlFlowGraphBuilder.cs (3)
6233return new FieldReferenceOperation(fieldReference.Field, fieldReference.IsDeclaration, instance, semanticModel: null, 7126IOperation? visitedInstance = operation.Field.IsStatic ? null : Visit(operation.Instance); 7127return new FieldReferenceOperation(operation.Field, operation.IsDeclaration, visitedInstance, semanticModel: null,
Microsoft.CodeAnalysis.CodeStyle (6)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (3)
98var (isCandidate, written) = TryGetOrInitializeFieldState(fieldReference.Field, operationContext.Options, operationContext.CancellationToken); 108UpdateFieldStateOnWrite(fieldReference.Field); 263var field = fieldReference.Field;
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
528Field.DeclaringSyntaxReferences.Length: 1, 534return fieldReference.Field;
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
49var field = fieldReferenceOperation.Field;
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
290if (operation is IFieldReferenceOperation { Field.IsReadOnly: false } fieldReference &&
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
172var fieldReference = fieldReferenceOperation.Field.OriginalDefinition;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
249Field: IFieldSymbol referencedField 448{ Instance: IInstanceReferenceOperation, Field: IFieldSymbol field }
Microsoft.CodeAnalysis.CSharp.Features (4)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
290if (operation is IFieldReferenceOperation { Field.IsReadOnly: false } fieldReference &&
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
172var fieldReference = fieldReferenceOperation.Field.OriginalDefinition;
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (2)
249Field: IFieldSymbol referencedField 448{ Instance: IInstanceReferenceOperation, Field: IFieldSymbol field }
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (3)
IOperation\IOperationTests.cs (1)
564Assert.Equal("b", fieldOperation.Field.Name);
IOperation\IOperationTests_IFieldReferenceExpression.cs (2)
714Assert.True(fieldSym.Equals(fieldReferenceOperation.Field)); 715Assert.Equal(fieldSym.GetHashCode(), fieldReferenceOperation.Field.GetHashCode());
Microsoft.CodeAnalysis.Features (6)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (3)
98var (isCandidate, written) = TryGetOrInitializeFieldState(fieldReference.Field, operationContext.Options, operationContext.CancellationToken); 108UpdateFieldStateOnWrite(fieldReference.Field); 263var field = fieldReference.Field;
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (2)
528Field.DeclaringSyntaxReferences.Length: 1, 534return fieldReference.Field;
src\Analyzers\Core\Analyzers\UseExplicitTupleName\UseExplicitTupleNameDiagnosticAnalyzer.cs (1)
49var field = fieldReferenceOperation.Field;
Microsoft.CodeAnalysis.Test.Utilities (7)
Compilation\OperationTreeVerifier.cs (1)
1065LogString($": {operation.Field.ToTestDisplayString()}");
Compilation\TestOperationVisitor.cs (1)
685Assert.Same(operation.Member, operation.Field);
Diagnostics\CommonDiagnosticAnalyzers.cs (2)
1445var diagnostic = Diagnostic.Create(Descriptor, operation.Syntax.GetLocation(), operation.Field.Name, operation.Field.ConstantValue);
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (1)
247IFieldSymbol targetField = ((IFieldReferenceOperation)target).Field;
Diagnostics\FieldCouldBeReadOnlyAnalyzer.cs (1)
125IFieldSymbol targetField = fieldReference.Field;
Diagnostics\OperationTestAnalyzer.cs (1)
1384memberSymbol = ((IFieldReferenceOperation)operation).Field;
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (1)
IOperation\IOperationTests.vb (1)
872Assert.Equal("b", fieldOperation.Field.Name)