1 implementation of Instance
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5166public IOperation? Instance { get; }
70 references to Instance
ILLink.RoslynAnalyzer (1)
DataFlow\LocalDataFlowVisitor.cs (1)
553 => ProcessMethodCall (operation, operation.TargetMethod, operation.Instance, operation.Arguments, state);
Microsoft.Analyzers.Extra (1)
AsyncCallInsideUsingBlockAnalyzer.cs (1)
165.Where(operation => ReferencesSymbol(operation.Instance, taskSymbol))
Microsoft.AspNetCore.Analyzers (2)
MiddlewareAnalyzer.cs (1)
34invocation.Instance == null &&
ServicesAnalyzer.cs (1)
29invocation.Instance == null &&
Microsoft.AspNetCore.App.Analyzers (4)
Http\HeaderDictionaryAddAnalyzer.cs (1)
36&& SymbolEqualityComparer.Default.Equals(wellKnownTypes.Get(WellKnownType.Microsoft_AspNetCore_Http_IHeaderDictionary), invocation.Instance?.Type))
Kestrel\ListenOnIPv6AnyAnalyzer.cs (1)
113Instance.Type:
src\Shared\Roslyn\CodeAnalysisExtensions.cs (2)
181if (invocation.Instance != null) 183return GetReceiverType(invocation.Instance.Syntax, invocation.SemanticModel, cancellationToken);
Microsoft.AspNetCore.Mvc.Analyzers (2)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (2)
181if (invocation.Instance != null) 183return GetReceiverType(invocation.Instance.Syntax, invocation.SemanticModel, cancellationToken);
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (2)
181if (invocation.Instance != null) 183return GetReceiverType(invocation.Instance.Syntax, invocation.SemanticModel, cancellationToken);
Microsoft.CodeAnalysis (1)
Operations\ControlFlowGraphBuilder.cs (1)
5930IOperation? instance = operation.TargetMethod.IsStatic ? null : operation.Instance;
Microsoft.CodeAnalysis.CodeStyle (9)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (2)
74RoslynDebug.Assert(invocation.Instance is not null); 75return TryAddHashedSymbol(invocation.Instance, seenHash: true);
src\Analyzers\Core\Analyzers\QualifyMemberAccess\AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
70AnalyzeOperation(context, invocationOperation, invocationOperation.Instance);
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (2)
237if (invocation.Instance is { IsImplicit: false }) 239instance = invocation.Instance;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
253if (invocation.Instance != null && 254_reachingDelegateCreationTargets.TryGetValue(invocation.Instance, out var targets))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (2)
328if (operation.Instance != null) 330AnalyzePossibleDelegateInvocation(operation.Instance);
Microsoft.CodeAnalysis.CSharp.CodeStyle (10)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
357return IsPotentiallyMutatingMethod(owningMethod, invocationOperation.Instance, invocationOperation.TargetMethod);
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
109invocationOperation.Instance,
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (8)
103if (invocation.Instance is null) 142Contract.ThrowIfNull(invocation.Instance); 166Contract.ThrowIfNull(invocation.Instance); 189if (!IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.LeftOperand)) 205if (!IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.LeftOperand)) 228Contract.ThrowIfNull(invocation.Instance); 259IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.LeftOperand)) 277Contract.ThrowIfNull(invocation.Instance);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (3)
44Instance: IInstanceReferenceOperation, 631Instance: IOperation instance, 768Instance: IMemberReferenceOperation invokedOn,
Microsoft.CodeAnalysis.CSharp.Features (14)
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (1)
108IInvocationOperation invocation => invocation.Instance,
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
357return IsPotentiallyMutatingMethod(owningMethod, invocationOperation.Instance, invocationOperation.TargetMethod);
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (1)
109invocationOperation.Instance,
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (8)
103if (invocation.Instance is null) 142Contract.ThrowIfNull(invocation.Instance); 166Contract.ThrowIfNull(invocation.Instance); 189if (!IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.LeftOperand)) 205if (!IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.LeftOperand)) 228Contract.ThrowIfNull(invocation.Instance); 259IsInstanceLengthCheck(memberInfo.LengthLikeProperty, invocation.Instance, subtraction.LeftOperand)) 277Contract.ThrowIfNull(invocation.Instance);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (3)
44Instance: IInstanceReferenceOperation, 631Instance: IOperation instance, 768Instance: IMemberReferenceOperation invokedOn,
Microsoft.CodeAnalysis.Features (5)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (2)
74RoslynDebug.Assert(invocation.Instance is not null); 75return TryAddHashedSymbol(invocation.Instance, seenHash: true);
src\Analyzers\Core\Analyzers\QualifyMemberAccess\AbstractQualifyMemberAccessDiagnosticAnalyzer.cs (1)
70AnalyzeOperation(context, invocationOperation, invocationOperation.Instance);
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (2)
237if (invocation.Instance is { IsImplicit: false }) 239instance = invocation.Instance;
Microsoft.CodeAnalysis.Test.Utilities (12)
Compilation\ControlFlowGraphVerifier.cs (1)
933Instance: { } instance,
Compilation\OperationTreeVerifier.cs (3)
824var spacing = !operation.IsVirtual && operation.Instance != null ? " " : string.Empty; 836VisitInstance(operation.Instance); 1044else if (operation.Parent is IInvocationOperation invocation && invocation.Instance == operation)
Compilation\TestOperationVisitor.cs (4)
542if (operation.Instance != null) 544children = new[] { operation.Instance }.Concat(operation.Arguments); 556operation.Instance is IInstanceReferenceOperation) 558Assert.False(operation.Instance.IsImplicit, $"Implicit {nameof(IInstanceReferenceOperation)} on {operation.Syntax}");
Diagnostics\BoxingOperationAnalyzer.cs (3)
62if (invocation.Instance != null && 63invocation.Instance.Type.IsValueType && 66Report(operationContext, invocation.Instance.Syntax);
Diagnostics\OperationTestAnalyzer.cs (1)
1401receiver = ((IInvocationOperation)operation).Instance;
Microsoft.CodeAnalysis.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
253if (invocation.Instance != null && 254_reachingDelegateCreationTargets.TryGetValue(invocation.Instance, out var targets))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (2)
328if (operation.Instance != null) 330AnalyzePossibleDelegateInvocation(operation.Instance);