1 implementation of IInstanceReferenceOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
6104internal sealed partial class InstanceReferenceOperation : Operation, IInstanceReferenceOperation
60 references to IInstanceReferenceOperation
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (1)
107IInstanceReferenceOperation i => i.Type,
ILLink.RoslynAnalyzer (2)
DataFlow\LocalDataFlowVisitor.cs (1)
345 case IInstanceReferenceOperation:
TrimAnalysis\TrimAnalysisVisitor.cs (1)
139 public override MultiValue VisitInstanceReference (IInstanceReferenceOperation instanceRef, StateValue state)
Microsoft.CodeAnalysis (14)
Generated\OperationKind.Generated.cs (1)
100/// <summary>Indicates an <see cref="IInstanceReferenceOperation"/>.</summary>
Generated\Operations.Generated.cs (4)
1691/// as the target whose Instance is an <see cref="IInstanceReferenceOperation" /> with <see cref="InstanceReferenceKind.ImplicitReceiver" /> kind. 10981public override IOperation VisitInstanceReference(IInstanceReferenceOperation operation, object? argument) 11453public virtual void VisitInstanceReference(IInstanceReferenceOperation operation) => DefaultVisit(operation); 11592public virtual TResult? VisitInstanceReference(IInstanceReferenceOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraphBuilder.cs (7)
6287|| memberInitializer.InitializedMember is NoneOperation { ChildOperations: var children } && children.ToImmutableArray() is [IInstanceReferenceOperation, _]) 6339children.ToImmutableArray() is [IInstanceReferenceOperation, var index]) 6396Debug.Assert(((IInstanceReferenceOperation)propertyReference.Instance).ReferenceKind == InstanceReferenceKind.ImplicitReceiver); 6580public override IOperation VisitInstanceReference(IInstanceReferenceOperation operation, int? captureIdForResult) 7141if (operation.Instance is IInstanceReferenceOperation instanceReference && 7220IInstanceReferenceOperation? instance = fieldSymbol.IsStatic ? 8000Debug.Assert(((IInstanceReferenceOperation)propertyReference.Instance).ReferenceKind == InstanceReferenceKind.ImplicitReceiver);
Operations\ControlFlowGraphBuilder.InterpolatedStringContext.cs (1)
50Debug.Assert(placeholderOperation is IInstanceReferenceOperation { ReferenceKind: InstanceReferenceKind.InterpolatedStringHandler } or IInterpolatedStringHandlerArgumentPlaceholderOperation);
Operations\InstanceReferenceKind.cs (1)
8/// Kind of reference for an <see cref="IInstanceReferenceOperation"/>.
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (1)
121if (value is IInstanceReferenceOperation instanceReference &&
src\Analyzers\Core\Analyzers\QualifyMemberAccess\AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
94if ((instanceOperation as IInstanceReferenceOperation)?.ReferenceKind == InstanceReferenceKind.ImplicitReceiver)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
524Instance: null or IInstanceReferenceOperation
Microsoft.CodeAnalysis.CSharp (5)
Operations\CSharpOperationFactory.cs (4)
1301private IInstanceReferenceOperation CreateBoundBaseReferenceOperation(BoundBaseReference boundBaseReference) 1310private IInstanceReferenceOperation CreateBoundThisReferenceOperation(BoundThisReference boundThisReference) 1696private IInstanceReferenceOperation CreateBoundImplicitReceiverOperation(BoundImplicitReceiver boundImplicitReceiver) 2931private IInstanceReferenceOperation CreateCollectionValuePlaceholderOperation(BoundObjectOrCollectionValuePlaceholder placeholder)
Operations\CSharpOperationFactory_Methods.cs (1)
33private IInstanceReferenceOperation CreateImplicitReceiver(SyntaxNode syntax, TypeSymbol type) =>
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
103if (operationAssigmnent.Target is IInstanceReferenceOperation { ReferenceKind: InstanceReferenceKind.ContainingTypeInstance })
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
241if (operation is IInstanceReferenceOperation)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (2)
508if (operation is IInstanceReferenceOperation) 566if (instance is not IInstanceReferenceOperation)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (4)
44Instance: IInstanceReferenceOperation, 448{ Instance: IInstanceReferenceOperation, Field: IFieldSymbol field } 451{ Instance: IInstanceReferenceOperation, Property: IPropertySymbol property } 614IInstanceReferenceOperation thisReference => thisReference.Type,
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
154if (descendent is IInstanceReferenceOperation { ReferenceKind: InstanceReferenceKind.ContainingTypeInstance } instanceReference)
Microsoft.CodeAnalysis.CSharp.Features (10)
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
118if (instance is IInstanceReferenceOperation instanceReference &&
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
103if (operationAssigmnent.Target is IInstanceReferenceOperation { ReferenceKind: InstanceReferenceKind.ContainingTypeInstance })
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
241if (operation is IInstanceReferenceOperation)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (2)
508if (operation is IInstanceReferenceOperation) 566if (instance is not IInstanceReferenceOperation)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (4)
44Instance: IInstanceReferenceOperation, 448{ Instance: IInstanceReferenceOperation, Field: IFieldSymbol field } 451{ Instance: IInstanceReferenceOperation, Property: IPropertySymbol property } 614IInstanceReferenceOperation thisReference => thisReference.Type,
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
154if (descendent is IInstanceReferenceOperation { ReferenceKind: InstanceReferenceKind.ContainingTypeInstance } instanceReference)
Microsoft.CodeAnalysis.Features (3)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (1)
121if (value is IInstanceReferenceOperation instanceReference &&
src\Analyzers\Core\Analyzers\QualifyMemberAccess\AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
94if ((instanceOperation as IInstanceReferenceOperation)?.ReferenceKind == InstanceReferenceKind.ImplicitReceiver)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
524Instance: null or IInstanceReferenceOperation
Microsoft.CodeAnalysis.Test.Utilities (13)
Compilation\ControlFlowGraphVerifier.cs (2)
1885var instanceReference = (IInstanceReferenceOperation)n;
Compilation\OperationTreeVerifier.cs (3)
1032public override void VisitInstanceReference(IInstanceReferenceOperation operation) 1034LogString(nameof(IInstanceReferenceOperation)); 1462Assert.Equal(InstanceReferenceKind.ImplicitReceiver, ((IInstanceReferenceOperation)propertyReference.Instance).ReferenceKind);
Compilation\TestOperationVisitor.cs (6)
556operation.Instance is IInstanceReferenceOperation) 558Assert.False(operation.Instance.IsImplicit, $"Implicit {nameof(IInstanceReferenceOperation)} on {operation.Syntax}"); 640public override void VisitInstanceReference(IInstanceReferenceOperation operation) 666operation.Instance is IInstanceReferenceOperation) 668Assert.False(operation.Instance.IsImplicit, $"Implicit {nameof(IInstanceReferenceOperation)} on {operation.Syntax}"); 1055Assert.Equal(InstanceReferenceKind.ImplicitReceiver, ((IInstanceReferenceOperation)propertyReference.Instance).ReferenceKind);
Diagnostics\OperationTestAnalyzer.cs (2)
953IInstanceReferenceOperation instanceReference = (IInstanceReferenceOperation)operationContext.Operation;