1 implementation of IArgumentOperation
Microsoft.CodeAnalysis (1)
456 references to IArgumentOperation
Aspire.Hosting.Analyzers (2)
ConfigurationSchemaGenerator (4)
GenerateDocumentationAndConfigFiles (9)
ILLink.RoslynAnalyzer (9)
Metrics (9)
Metrics.Legacy (9)
Microsoft.Analyzers.Extra (6)
Microsoft.Analyzers.Local (1)
Microsoft.AspNetCore.App.Analyzers (16)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (5)
Microsoft.AspNetCore.Mvc.Analyzers (1)
Microsoft.AspNetCore.Mvc.Api.Analyzers (3)
Microsoft.CodeAnalysis (72)
Generated\Operations.Generated.cs (18)
663ImmutableArray<IArgumentOperation> Arguments { get; }
797ImmutableArray<IArgumentOperation> Arguments { get; }
1006ImmutableArray<IArgumentOperation> Arguments { get; }
1291ImmutableArray<IArgumentOperation> Arguments { get; }
3756ImmutableArray<IArgumentOperation> Arguments { get; }
5010internal RaiseEventOperation(IEventReferenceOperation eventReference, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit)
5017public ImmutableArray<IArgumentOperation> Arguments { get; }
5154internal InvocationOperation(IMethodSymbol targetMethod, ITypeSymbol? constrainedToType, IOperation? instance, bool isVirtual, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit)
5168public ImmutableArray<IArgumentOperation> Arguments { get; }
5456internal PropertyReferenceOperation(IPropertySymbol property, ITypeSymbol? constrainedToType, ImmutableArray<IArgumentOperation> arguments, IOperation? instance, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit)
5466public ImmutableArray<IArgumentOperation> Arguments { get; }
5917internal ObjectCreationOperation(IMethodSymbol? constructor, IObjectOrCollectionInitializerOperation? initializer, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit)
5928public ImmutableArray<IArgumentOperation> Arguments { get; }
10290internal FunctionPointerInvocationOperation(IOperation target, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit)
10298public ImmutableArray<IArgumentOperation> Arguments { get; }
11156public override IOperation VisitArgument(IArgumentOperation operation, object? argument)
11493public virtual void VisitArgument(IArgumentOperation operation) => DefaultVisit(operation);
11632public virtual TResult? VisitArgument(IArgumentOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraphBuilder.cs (43)
2035private ImmutableArray<IArgumentOperation> VisitArguments(ImmutableArray<IArgumentOperation> arguments, bool instancePushed)
2043private void VisitAndPushArguments(ImmutableArray<IArgumentOperation> arguments, bool instancePushed)
2090private IArgumentOperation RewriteArgumentFromArray(IOperation visitedArgument, int index, ImmutableArray<IArgumentOperation> args)
3344ImmutableArray<IArgumentOperation>.Empty, semanticModel: null, value.Syntax,
3955private void HandleUsingOperationParts(IOperation resources, IOperation body, IMethodSymbol? disposeMethod, ImmutableArray<IArgumentOperation> disposeArguments, ImmutableArray<ILocalSymbol> locals, bool isAsynchronous,
4112private void AddDisposingFinally(IOperation resource, bool requiresRuntimeConversion, ITypeSymbol iDisposable, IMethodSymbol? disposeMethod, ImmutableArray<IArgumentOperation> disposeArguments, bool isAsynchronous)
4177ImmutableArray<IArgumentOperation> args;
4186args = ImmutableArray<IArgumentOperation>.Empty;
4231disposeArguments: ImmutableArray<IArgumentOperation>.Empty,
4245arguments: ImmutableArray<IArgumentOperation>.Empty,
4343ImmutableArray.Create<IArgumentOperation>(
4371ImmutableArray.Create<IArgumentOperation>(
4426ImmutableArray.Create<IArgumentOperation>(
4695InvocationOperation makeInvocationDroppingInstanceForStaticMethods(IMethodSymbol method, IOperation instance, ImmutableArray<IArgumentOperation> arguments)
4700InvocationOperation makeInvocation(SyntaxNode syntax, IMethodSymbol method, IOperation? instanceOpt, ImmutableArray<IArgumentOperation> arguments)
4710ImmutableArray<IArgumentOperation> makeArguments(ImmutableArray<IArgumentOperation> arguments, ref IOperation? instance)
4725return ImmutableArray<IArgumentOperation>.Empty;
4806var builder = ArrayBuilder<IArgumentOperation>.GetInstance(parametersCount, fillWithValue: null!);
5931(IOperation? visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments) = VisitInstanceWithArguments(instance, operation.Arguments);
5946(IOperation visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments) handlePointerAndArguments(
5947IOperation targetPointer, ImmutableArray<IArgumentOperation> arguments)
5951ImmutableArray<IArgumentOperation> visitedArguments = VisitArguments(arguments, instancePushed: false);
5958private (IOperation? visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments) VisitInstanceWithArguments(IOperation? instance, ImmutableArray<IArgumentOperation> arguments)
5966ImmutableArray<IArgumentOperation> visitedArguments = VisitArguments(arguments, instancePushed: hasInstance);
5984ImmutableArray<IArgumentOperation> visitedArgs = VisitArguments(operation.Arguments, instancePushed: false);
6243ImmutableArray<IArgumentOperation> propertyArguments = PopArray(propertyReference.Arguments, RewriteArgumentFromArray);
6303foreach (var argument in propertyReference.Arguments)
6400IOperation visitedTarget = new PropertyReferenceOperation(propertyReference.Property, propertyReference.ConstrainedToType, ImmutableArray<IArgumentOperation>.Empty, visitedPropertyInstance,
6814IArgumentOperation? outParameterArgument = null;
7161(IOperation? visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments) = VisitInstanceWithArguments(instance, operation.Arguments);
7243ImmutableArray<IArgumentOperation> arguments;
7247var builder = ArrayBuilder<IArgumentOperation>.GetInstance(propertySymbol.Parameters.Length);
7263arguments = ImmutableArray<IArgumentOperation>.Empty;
7351(IOperation? visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments) =
7797matchFailureCtor, initializer: null, ImmutableArray<IArgumentOperation>.Empty, semanticModel: null, operation.Syntax,
7905public override IOperation VisitArgument(IArgumentOperation operation, int? captureIdForResult)
7935isVirtual: true, arguments: ImmutableArray<IArgumentOperation>.Empty,
8037var visitedValue = new PropertyReferenceOperation(property, constrainedToType: null, ImmutableArray<IArgumentOperation>.Empty, oldInstance,
8063var target = new PropertyReferenceOperation(property, constrainedToType: null, ImmutableArray<IArgumentOperation>.Empty, implicitReceiver,
Microsoft.CodeAnalysis.Analyzers (42)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (27)
31using PooledLocalizabeStringsConcurrentDictionary = PooledConcurrentDictionary<INamedTypeSymbol, PooledConcurrentSet<(IFieldSymbol field, IArgumentOperation argument)>>;
528[NotNullWhen(returnValue: true)] out ImmutableArray<IArgumentOperation> creationArguments)
617ImmutableArray<IArgumentOperation> creationArguments,
625IArgumentOperation? titleArgument = creationArguments.FirstOrDefault(a => a.Parameter?.Name.Equals("title", StringComparison.OrdinalIgnoreCase) == true);
639private static void AnalyzeTitleCore(string title, IArgumentOperation argumentOperation, Location fixLocation, Action<Diagnostic> reportDiagnostic)
665IArgumentOperation argumentOperation,
720ImmutableArray<IArgumentOperation> creationArguments,
727var messageArgument = creationArguments.FirstOrDefault(a => a.Parameter?.Name.Equals("messageFormat", StringComparison.OrdinalIgnoreCase) == true);
736private static void AnalyzeMessageCore(string message, IArgumentOperation argumentOperation, Location fixLocation, Action<Diagnostic> reportDiagnostic)
767ImmutableArray<IArgumentOperation> creationArguments,
774IArgumentOperation? descriptionArgument = creationArguments.FirstOrDefault(a => a.Parameter?.Name.Equals("description", StringComparison.OrdinalIgnoreCase) == true);
783private static void AnalyzeDescriptionCore(string description, IArgumentOperation argumentOperation, Location fixLocation, Action<Diagnostic> reportDiagnostic)
804IArgumentOperation argument,
805Action<string, IArgumentOperation, Location, Action<Diagnostic>> analyzeStringValueCore,
834var builder = localizableStringsMap.GetOrAdd(containingType, _ => PooledConcurrentSet<(IFieldSymbol, IArgumentOperation)>.GetInstance());
842Action<string, IArgumentOperation, Location, Action<Diagnostic>> analyzeStringValueCore,
845IArgumentOperation argument,
860Action<string, IArgumentOperation, Location, Action<Diagnostic>> analyzeLocalizableStringValueCore,
884IArgumentOperation argumentOperation,
1029ImmutableArray<IArgumentOperation> creationArguments,
1035foreach (var argument in creationArguments)
1056ImmutableArray<IArgumentOperation> creationArguments,
1066var argument = creationArguments.FirstOrDefault(
1107private static (bool? isEnabledByDefault, DiagnosticSeverity? defaultSeverity) GetDefaultSeverityAndEnabledByDefault(Compilation compilation, ImmutableArray<IArgumentOperation> creationArguments)
1115foreach (var argument in creationArguments)
1184ImmutableArray<IArgumentOperation> creationArguments,
1200foreach (var argument in creationArguments)
Microsoft.CodeAnalysis.AnalyzerUtilities (82)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (8)
164foreach (IArgumentOperation argumentOperation in operation.Arguments)
177foreach (IArgumentOperation argumentOperation in operation.Arguments)
456public override PropertySetAbstractValue VisitInvocation_NonLambdaOrDelegateOrLocalFunction(IMethodSymbol method, IOperation? visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments, bool invokedAsDelegate, IOperation originalOperation, PropertySetAbstractValue defaultValue)
463foreach (IArgumentOperation visitedArgument in visitedArguments)
514ImmutableArray<IArgumentOperation> visitedArguments,
530foreach (IArgumentOperation argumentOperation in visitedArguments)
635public override PropertySetAbstractValue VisitInvocation_LocalFunction(IMethodSymbol localFunction, ImmutableArray<IArgumentOperation> visitedArguments, IOperation originalOperation, PropertySetAbstractValue defaultValue)
643public override PropertySetAbstractValue VisitInvocation_Lambda(IFlowAnonymousFunctionOperation lambda, ImmutableArray<IArgumentOperation> visitedArguments, IOperation originalOperation, PropertySetAbstractValue defaultValue)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (16)
252IEnumerable<IArgumentOperation> taintedArguments = GetTaintedArguments(operation.Arguments);
264ImmutableArray<IArgumentOperation> visitedArguments,
278IEnumerable<IArgumentOperation> taintedArguments = GetTaintedArguments(visitedArguments);
320IArgumentOperation? argumentOperation = visitedArguments.FirstOrDefault(o => o.Parameter?.Name == taintedTarget);
399IArgumentOperation? thenSanitizedTargetOperation = visitedArguments.FirstOrDefault(o => o.Parameter?.Name == thenSanitizedTarget);
423public override TaintedDataAbstractValue VisitInvocation_LocalFunction(IMethodSymbol localFunction, ImmutableArray<IArgumentOperation> visitedArguments, IOperation originalOperation, TaintedDataAbstractValue defaultValue)
428IEnumerable<IArgumentOperation> taintedArguments = GetTaintedArguments(visitedArguments);
437public override TaintedDataAbstractValue VisitInvocation_Lambda(IFlowAnonymousFunctionOperation lambda, ImmutableArray<IArgumentOperation> visitedArguments, IOperation originalOperation, TaintedDataAbstractValue defaultValue)
442IEnumerable<IArgumentOperation> taintedArguments = GetTaintedArguments(visitedArguments);
460IArgumentOperation operation,
560IEnumerable<IArgumentOperation> taintedArguments,
568foreach (IArgumentOperation taintedArgument in taintedArguments)
631ImmutableArray<IArgumentOperation> arguments,
683private static bool IsMethodArgumentASink(IMethodSymbol method, IEnumerable<SinkInfo> infosForType, IArgumentOperation taintedArgument, [NotNullWhen(returnValue: true)] out HashSet<SinkKind>? sinkKinds)
753private IEnumerable<IArgumentOperation> GetTaintedArguments(ImmutableArray<IArgumentOperation> arguments)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (21)
49private readonly HashSet<IArgumentOperation> _pendingArgumentsToReset;
50private readonly List<IArgumentOperation> _pendingArgumentsToPostProcess;
977private bool IsContractCheckArgument(IArgumentOperation operation)
1216protected virtual TAbstractAnalysisValue ComputeAnalysisValueForEscapedRefOrOutArgument(IArgumentOperation operation, TAbstractAnalysisValue defaultValue)
1491Debug.Assert(IsContractCheckArgument((IArgumentOperation)operation));
1669case IArgumentOperation argument:
2205ImmutableArray<IArgumentOperation> arguments,
2402foreach (var argument in arguments)
2519foreach (var argument in arguments)
2550IParameterSymbol GetMappedParameterForArgument(IArgumentOperation argumentOperation)
2783foreach (IArgumentOperation argumentOperation in pendingArguments)
3072public sealed override TAbstractAnalysisValue VisitArgument(IArgumentOperation operation, object? argument)
3097protected virtual void PostProcessArgument(IArgumentOperation operation, bool isEscaped)
3104/// This method resets the analysis data for an object instance passed around as an <see cref="IArgumentOperation"/>
3107private void PostProcessEscapedArgument(IArgumentOperation operation)
3227void PostVisitInvocation(IMethodSymbol targetMethod, ImmutableArray<IArgumentOperation> arguments)
3252void ProcessInterlockedOperation(IMethodSymbol targetMethod, ImmutableArray<IArgumentOperation> arguments, INamedTypeSymbol interlockedType)
3267foreach (var argument in arguments)
3536ImmutableArray<IArgumentOperation> visitedArguments,
3578ImmutableArray<IArgumentOperation> visitedArguments,
3596ImmutableArray<IArgumentOperation> visitedArguments,
Microsoft.CodeAnalysis.BannedApiAnalyzers (9)
Microsoft.CodeAnalysis.CodeStyle (5)
Microsoft.CodeAnalysis.CSharp (24)
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
Microsoft.CodeAnalysis.CSharp.Features (6)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Microsoft.CodeAnalysis.Features (14)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (9)
Microsoft.CodeAnalysis.PublicApiAnalyzers (9)
Microsoft.CodeAnalysis.ResxSourceGenerator (9)
Microsoft.CodeAnalysis.Test.Utilities (18)
Microsoft.CodeAnalysis.VisualBasic (8)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.Extensions.Validation.ValidationsGenerator (5)
Microsoft.Interop.ComInterfaceGenerator (4)
Microsoft.Interop.LibraryImportGenerator (8)
Microsoft.Interop.LibraryImportGenerator.Downlevel (4)
Roslyn.Diagnostics.Analyzers (10)
Roslyn.Diagnostics.CSharp.Analyzers (3)
System.Text.RegularExpressions.Generator (9)
Test.Utilities (9)
Text.Analyzers (9)