45 references to InstanceReferenceKind
ILLink.RoslynAnalyzer (1)
TrimAnalysis\TrimAnalysisVisitor.cs (1)
141 if (instanceRef.ReferenceKind != InstanceReferenceKind.ContainingTypeInstance)
Microsoft.CodeAnalysis (14)
Generated\Operations.Generated.cs (4)
1372InstanceReferenceKind ReferenceKind { get; } 1691/// as the target whose Instance is an <see cref="IInstanceReferenceOperation" /> with <see cref="InstanceReferenceKind.ImplicitReceiver" /> kind. 6106internal InstanceReferenceOperation(InstanceReferenceKind referenceKind, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 6112public InstanceReferenceKind ReferenceKind { get; }
Operations\ControlFlowGraphBuilder.cs (9)
6396Debug.Assert(((IInstanceReferenceOperation)propertyReference.Instance).ReferenceKind == InstanceReferenceKind.ImplicitReceiver); 6398var visitedPropertyInstance = new InstanceReferenceOperation(InstanceReferenceKind.ImplicitReceiver, semanticModel: null, 6584case InstanceReferenceKind.ImplicitReceiver: 6599case InstanceReferenceKind.InterpolatedStringHandler: 7142instanceReference.ReferenceKind == InstanceReferenceKind.ImplicitReceiver && 7222new InstanceReferenceOperation(InstanceReferenceKind.ContainingTypeInstance, semanticModel: null, 7240new InstanceReferenceOperation(InstanceReferenceKind.ContainingTypeInstance, semanticModel: null, 8000Debug.Assert(((IInstanceReferenceOperation)propertyReference.Instance).ReferenceKind == InstanceReferenceKind.ImplicitReceiver); 8059var implicitReceiver = new InstanceReferenceOperation(InstanceReferenceKind.ImplicitReceiver,
Operations\ControlFlowGraphBuilder.InterpolatedStringContext.cs (1)
50Debug.Assert(placeholderOperation is IInstanceReferenceOperation { ReferenceKind: InstanceReferenceKind.InterpolatedStringHandler } or IInterpolatedStringHandlerArgumentPlaceholderOperation);
Microsoft.CodeAnalysis.CodeStyle (3)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (1)
122instanceReference.ReferenceKind == InstanceReferenceKind.ContainingTypeInstance &&
src\Analyzers\Core\Analyzers\QualifyMemberAccess\AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
94if ((instanceOperation as IInstanceReferenceOperation)?.ReferenceKind == InstanceReferenceKind.ImplicitReceiver)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
526ReferenceKind: InstanceReferenceKind.ContainingTypeInstance,
Microsoft.CodeAnalysis.CSharp (12)
Operations\CSharpOperationFactory.cs (10)
1303InstanceReferenceKind referenceKind = InstanceReferenceKind.ContainingTypeInstance; 1312InstanceReferenceKind referenceKind = InstanceReferenceKind.ContainingTypeInstance; 1698InstanceReferenceKind referenceKind = InstanceReferenceKind.ImplicitReceiver; 2508InstanceReferenceKind.InterpolatedStringHandler, 2924=> symbol?.IsStatic == false ? new InstanceReferenceOperation(InstanceReferenceKind.PatternInput, _semanticModel, nameSyntax!, receiverType, isImplicit: true) : null; 2933InstanceReferenceKind referenceKind = InstanceReferenceKind.ImplicitReceiver;
Operations\CSharpOperationFactory_Methods.cs (2)
34new InstanceReferenceOperation(InstanceReferenceKind.ImplicitReceiver, _semanticModel, syntax, type.GetPublicSymbol(), isImplicit: true); 428referenceKind: InstanceReferenceKind.ImplicitReceiver,
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
103if (operationAssigmnent.Target is IInstanceReferenceOperation { ReferenceKind: InstanceReferenceKind.ContainingTypeInstance })
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
154if (descendent is IInstanceReferenceOperation { ReferenceKind: InstanceReferenceKind.ContainingTypeInstance } instanceReference)
Microsoft.CodeAnalysis.CSharp.Features (3)
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
119instanceReference.ReferenceKind != InstanceReferenceKind.ContainingTypeInstance)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
103if (operationAssigmnent.Target is IInstanceReferenceOperation { ReferenceKind: InstanceReferenceKind.ContainingTypeInstance })
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)
122instanceReference.ReferenceKind == InstanceReferenceKind.ContainingTypeInstance &&
src\Analyzers\Core\Analyzers\QualifyMemberAccess\AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
94if ((instanceOperation as IInstanceReferenceOperation)?.ReferenceKind == InstanceReferenceKind.ImplicitReceiver)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
526ReferenceKind: InstanceReferenceKind.ContainingTypeInstance,
Microsoft.CodeAnalysis.Test.Utilities (7)
Compilation\ControlFlowGraphVerifier.cs (4)
1886return instanceReference.ReferenceKind == InstanceReferenceKind.ContainingTypeInstance || 1887instanceReference.ReferenceKind == InstanceReferenceKind.PatternInput || 1890instanceReference.ReferenceKind == InstanceReferenceKind.InterpolatedStringHandler || 1891(instanceReference.ReferenceKind == InstanceReferenceKind.ImplicitReceiver &&
Compilation\OperationTreeVerifier.cs (1)
1462Assert.Equal(InstanceReferenceKind.ImplicitReceiver, ((IInstanceReferenceOperation)propertyReference.Instance).ReferenceKind);
Compilation\TestOperationVisitor.cs (2)
644var referenceKind = operation.ReferenceKind; 1055Assert.Equal(InstanceReferenceKind.ImplicitReceiver, ((IInstanceReferenceOperation)propertyReference.Instance).ReferenceKind);