1 implementation of IInvocationOperation
Microsoft.CodeAnalysis (1)
307 references to IInvocationOperation
Aspire.Hosting.Analyzers (5)
ConfigurationSchemaGenerator (15)
ILLink.RoslynAnalyzer (6)
Microsoft.Analyzers.Extra (39)
Microsoft.Analyzers.Local (10)
CallAnalysis\CallAnalyzer.Registrar.cs (5)
33public void RegisterMethod(IMethodSymbol method, Action<OperationAnalysisContext, IInvocationOperation> action)
50public void RegisterMethods(string typeName, string methodName, Action<OperationAnalysisContext, IInvocationOperation> action)
66public void RegisterMethods(Dictionary<string, string[]> methods, Action<OperationAnalysisContext, IInvocationOperation> action)
165public void RegisterInterfaceMethod(IMethodSymbol method, Action<OperationAnalysisContext, IInvocationOperation> action)
200public void RegisterInterfaceMethods(Dictionary<string, string[]> methods, Action<OperationAnalysisContext, IInvocationOperation> action)
Microsoft.AspNetCore.Analyzers (7)
Microsoft.AspNetCore.App.Analyzers (37)
Microsoft.AspNetCore.Components.Analyzers (1)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (10)
Microsoft.AspNetCore.Mvc.Analyzers (4)
Microsoft.AspNetCore.Mvc.Api.Analyzers (3)
Microsoft.CodeAnalysis (14)
Generated\Operations.Generated.cs (11)
748/// 3 <see cref="IInvocationOperation" /> nodes, each of which will be a call to the corresponding <c>Add</c> method
756/// Similar to the C# example, <c>New C() From {1, 2, 3}</c> will have 3 <see cref="IInvocationOperation" />
1763/// <see cref="IInvocationOperation" /> and <see cref="IDynamicInvocationOperation" />, as appropriate.
1766/// None. This API has been obsoleted in favor of <see cref="IInvocationOperation" /> and <see cref="IDynamicInvocationOperation" />.
1777[Obsolete("ICollectionElementInitializerOperation has been replaced with " + nameof(IInvocationOperation) + " and " + nameof(IDynamicInvocationOperation), error: true)]
3709/// This can be an <see cref="IInvocationOperation" /> or <see cref="IDynamicInvocationOperation" /> for valid code, and <see cref="IInvalidOperation" /> for invalid code.
10901public override IOperation VisitInvocation(IInvocationOperation operation, object? argument)
11437public virtual void VisitInvocation(IInvocationOperation operation) => DefaultVisit(operation);
11466[Obsolete("ICollectionElementInitializerOperation has been replaced with " + nameof(IInvocationOperation) + " and " + nameof(IDynamicInvocationOperation), error: true)]
11576public virtual TResult? VisitInvocation(IInvocationOperation operation, TArgument argument) => DefaultVisit(operation, argument);
11605[Obsolete("ICollectionElementInitializerOperation has been replaced with " + nameof(IInvocationOperation) + " and " + nameof(IDynamicInvocationOperation), error: true)]
Microsoft.CodeAnalysis.CodeStyle (22)
Microsoft.CodeAnalysis.CSharp.CodeStyle (21)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (9)
82var result = AnalyzeInvocation((IInvocationOperation)operation, infoCache);
92public static Result? AnalyzeInvocation(IInvocationOperation invocation, InfoCache infoCache)
115IInvocationOperation invocation,
138IInvocationOperation invocation,
160IInvocationOperation invocation,
223IInvocationOperation invocation,
272IInvocationOperation invocation,
303private static bool IsValidIndexing(IInvocationOperation invocation, InfoCache infoCache, IMethodSymbol targetMethod)
339private static bool IsWriteableIndexer(IInvocationOperation invocation, IPropertySymbol indexer)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
Microsoft.CodeAnalysis.CSharp.Features (24)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (9)
82var result = AnalyzeInvocation((IInvocationOperation)operation, infoCache);
92public static Result? AnalyzeInvocation(IInvocationOperation invocation, InfoCache infoCache)
115IInvocationOperation invocation,
138IInvocationOperation invocation,
160IInvocationOperation invocation,
223IInvocationOperation invocation,
272IInvocationOperation invocation,
303private static bool IsValidIndexing(IInvocationOperation invocation, InfoCache infoCache, IMethodSymbol targetMethod)
339private static bool IsWriteableIndexer(IInvocationOperation invocation, IPropertySymbol indexer)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Microsoft.CodeAnalysis.Features (30)
Microsoft.CodeAnalysis.Test.Utilities (21)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
Microsoft.CodeAnalysis.VisualBasic.Features (3)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.Interop.ComInterfaceGenerator (10)
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (9)
53var methodsOfInterest = new Dictionary<ISymbol, ImmutableArray<Func<IInvocationOperation, (ITypeSymbol, Location)?>>>(SymbolEqualityComparer.Default);
106var operation = (IInvocationOperation)context.Operation;
108if (methodsOfInterest.TryGetValue(operation.TargetMethod.OriginalDefinition, out ImmutableArray<Func<IInvocationOperation, (ITypeSymbol, Location)?>> discoverers))
110foreach (Func<IInvocationOperation, (ITypeSymbol, Location)?> discoverer in discoverers)
186else if (operand is IInvocationOperation invocation && invocation.TargetMethod.Equals(getObjectForIUnknown, SymbolEqualityComparer.Default))
200static Func<IInvocationOperation, (ITypeSymbol Type, Location location)?> CreateArgumentTypeLookup(int ordinal) => invocation => invocation.GetArgumentByOrdinal(ordinal).Value switch
206static Func<IInvocationOperation, (ITypeSymbol Type, Location location)?> CreateTypeArgumentTypeLookup(int ordinal) => invocation =>
235static Func<IInvocationOperation, (ITypeSymbol Type, Location location)?> CreateTypeOfArgumentTypeLookup(int ordinal) => invocation => invocation.GetArgumentByOrdinal(ordinal).Value switch
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
Microsoft.VisualStudio.LanguageServices (1)
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (1)
System.Private.CoreLib.Generators (1)
System.Text.RegularExpressions.Generator (3)