1 implementation of IArgumentOperation
Microsoft.CodeAnalysis (1)
499 references to IArgumentOperation
Aspire.Hosting.Analyzers (2)
ConfigurationSchemaGenerator (4)
ILLink.RoslynAnalyzer (9)
Metrics (17)
Metrics.Legacy (17)
Microsoft.Analyzers.Extra (6)
Microsoft.Analyzers.Local (1)
Microsoft.AspNetCore.App.Analyzers (16)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (5)
Microsoft.AspNetCore.Http.ValidationsGenerator (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 (50)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer.cs (27)
26using PooledLocalizabeStringsConcurrentDictionary = PooledConcurrentDictionary<INamedTypeSymbol, PooledConcurrentSet<(IFieldSymbol field, IArgumentOperation argument)>>;
525[NotNullWhen(returnValue: true)] out ImmutableArray<IArgumentOperation> creationArguments)
614ImmutableArray<IArgumentOperation> creationArguments,
622IArgumentOperation? titleArgument = creationArguments.FirstOrDefault(a => a.Parameter?.Name.Equals("title", StringComparison.OrdinalIgnoreCase) == true);
636private static void AnalyzeTitleCore(string title, IArgumentOperation argumentOperation, Location fixLocation, Action<Diagnostic> reportDiagnostic)
662IArgumentOperation argumentOperation,
718ImmutableArray<IArgumentOperation> creationArguments,
725var messageArgument = creationArguments.FirstOrDefault(a => a.Parameter?.Name.Equals("messageFormat", StringComparison.OrdinalIgnoreCase) == true);
734private static void AnalyzeMessageCore(string message, IArgumentOperation argumentOperation, Location fixLocation, Action<Diagnostic> reportDiagnostic)
765ImmutableArray<IArgumentOperation> creationArguments,
772IArgumentOperation? descriptionArgument = creationArguments.FirstOrDefault(a => a.Parameter?.Name.Equals("description", StringComparison.OrdinalIgnoreCase) == true);
781private static void AnalyzeDescriptionCore(string description, IArgumentOperation argumentOperation, Location fixLocation, Action<Diagnostic> reportDiagnostic)
802IArgumentOperation argument,
803Action<string, IArgumentOperation, Location, Action<Diagnostic>> analyzeStringValueCore,
832var builder = localizableStringsMap.GetOrAdd(containingType, _ => PooledConcurrentSet<(IFieldSymbol, IArgumentOperation)>.GetInstance());
840Action<string, IArgumentOperation, Location, Action<Diagnostic>> analyzeStringValueCore,
843IArgumentOperation argument,
858Action<string, IArgumentOperation, Location, Action<Diagnostic>> analyzeLocalizableStringValueCore,
882IArgumentOperation argumentOperation,
1027ImmutableArray<IArgumentOperation> creationArguments,
1033foreach (var argument in creationArguments)
1054ImmutableArray<IArgumentOperation> creationArguments,
1064var argument = creationArguments.FirstOrDefault(
1105private static (bool? isEnabledByDefault, DiagnosticSeverity? defaultSeverity) GetDefaultSeverityAndEnabledByDefault(Compilation compilation, ImmutableArray<IArgumentOperation> creationArguments)
1113foreach (var argument in creationArguments)
1182ImmutableArray<IArgumentOperation> creationArguments,
1198foreach (var argument in creationArguments)
Microsoft.CodeAnalysis.AnalyzerUtilities (92)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysis.PropertySetDataFlowOperationVisitor.cs (8)
162foreach (IArgumentOperation argumentOperation in operation.Arguments)
175foreach (IArgumentOperation argumentOperation in operation.Arguments)
454public override PropertySetAbstractValue VisitInvocation_NonLambdaOrDelegateOrLocalFunction(IMethodSymbol method, IOperation? visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments, bool invokedAsDelegate, IOperation originalOperation, PropertySetAbstractValue defaultValue)
461foreach (IArgumentOperation visitedArgument in visitedArguments)
512ImmutableArray<IArgumentOperation> visitedArguments,
528foreach (IArgumentOperation argumentOperation in visitedArguments)
633public override PropertySetAbstractValue VisitInvocation_LocalFunction(IMethodSymbol localFunction, ImmutableArray<IArgumentOperation> visitedArguments, IOperation originalOperation, PropertySetAbstractValue defaultValue)
641public override PropertySetAbstractValue VisitInvocation_Lambda(IFlowAnonymousFunctionOperation lambda, ImmutableArray<IArgumentOperation> visitedArguments, IOperation originalOperation, PropertySetAbstractValue defaultValue)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\TaintedDataAnalysis.TaintedDataOperationVisitor.cs (16)
251IEnumerable<IArgumentOperation> taintedArguments = GetTaintedArguments(operation.Arguments);
263ImmutableArray<IArgumentOperation> visitedArguments,
277IEnumerable<IArgumentOperation> taintedArguments = GetTaintedArguments(visitedArguments);
319IArgumentOperation? argumentOperation = visitedArguments.FirstOrDefault(o => o.Parameter?.Name == taintedTarget);
398IArgumentOperation? thenSanitizedTargetOperation = visitedArguments.FirstOrDefault(o => o.Parameter?.Name == thenSanitizedTarget);
422public override TaintedDataAbstractValue VisitInvocation_LocalFunction(IMethodSymbol localFunction, ImmutableArray<IArgumentOperation> visitedArguments, IOperation originalOperation, TaintedDataAbstractValue defaultValue)
427IEnumerable<IArgumentOperation> taintedArguments = GetTaintedArguments(visitedArguments);
436public override TaintedDataAbstractValue VisitInvocation_Lambda(IFlowAnonymousFunctionOperation lambda, ImmutableArray<IArgumentOperation> visitedArguments, IOperation originalOperation, TaintedDataAbstractValue defaultValue)
441IEnumerable<IArgumentOperation> taintedArguments = GetTaintedArguments(visitedArguments);
459IArgumentOperation operation,
559IEnumerable<IArgumentOperation> taintedArguments,
567foreach (IArgumentOperation taintedArgument in taintedArguments)
630ImmutableArray<IArgumentOperation> arguments,
682private static bool IsMethodArgumentASink(IMethodSymbol method, IEnumerable<SinkInfo> infosForType, IArgumentOperation taintedArgument, [NotNullWhen(returnValue: true)] out HashSet<SinkKind>? sinkKinds)
752private IEnumerable<IArgumentOperation> GetTaintedArguments(ImmutableArray<IArgumentOperation> arguments)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (23)
47private readonly HashSet<IArgumentOperation> _pendingArgumentsToReset;
48private readonly List<IArgumentOperation> _pendingArgumentsToPostProcess;
275_pendingArgumentsToReset = new HashSet<IArgumentOperation>();
276_pendingArgumentsToPostProcess = new List<IArgumentOperation>();
975private bool IsContractCheckArgument(IArgumentOperation operation)
1214protected virtual TAbstractAnalysisValue ComputeAnalysisValueForEscapedRefOrOutArgument(IArgumentOperation operation, TAbstractAnalysisValue defaultValue)
1489Debug.Assert(IsContractCheckArgument((IArgumentOperation)operation));
1667case IArgumentOperation argument:
2203ImmutableArray<IArgumentOperation> arguments,
2400foreach (var argument in arguments)
2517foreach (var argument in arguments)
2548IParameterSymbol GetMappedParameterForArgument(IArgumentOperation argumentOperation)
2781foreach (IArgumentOperation argumentOperation in pendingArguments)
3070public sealed override TAbstractAnalysisValue VisitArgument(IArgumentOperation operation, object? argument)
3095protected virtual void PostProcessArgument(IArgumentOperation operation, bool isEscaped)
3102/// This method resets the analysis data for an object instance passed around as an <see cref="IArgumentOperation"/>
3105private void PostProcessEscapedArgument(IArgumentOperation operation)
3225void PostVisitInvocation(IMethodSymbol targetMethod, ImmutableArray<IArgumentOperation> arguments)
3250void ProcessInterlockedOperation(IMethodSymbol targetMethod, ImmutableArray<IArgumentOperation> arguments, INamedTypeSymbol interlockedType)
3265foreach (var argument in arguments)
3534ImmutableArray<IArgumentOperation> visitedArguments,
3576ImmutableArray<IArgumentOperation> visitedArguments,
3594ImmutableArray<IArgumentOperation> visitedArguments,
Microsoft.CodeAnalysis.BannedApiAnalyzers (17)
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.ResxSourceGenerator (17)
Microsoft.CodeAnalysis.Test.Utilities (16)
Microsoft.CodeAnalysis.VisualBasic (8)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.Interop.ComInterfaceGenerator (4)
Microsoft.Interop.LibraryImportGenerator (8)
Microsoft.Interop.LibraryImportGenerator.Downlevel (4)
Roslyn.Diagnostics.Analyzers (18)
Roslyn.Diagnostics.CSharp.Analyzers (1)
System.Text.RegularExpressions.Generator (9)
Test.Utilities (17)
Text.Analyzers (17)