1 implementation of IArgumentOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
7912internal sealed partial class ArgumentOperation : Operation, IArgumentOperation
456 references to IArgumentOperation
Aspire.Hosting.Analyzers (2)
AppHostAnalyzer.cs (2)
121IArgumentOperation? argumentOperation = null; 122foreach (var argument in invocation.Arguments)
ConfigurationSchemaGenerator (4)
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (4)
81IArgumentOperation instanceArg = GetArgumentForParameterAtIndex(operation.Arguments, instanceIndex); 120private static IArgumentOperation GetArgumentForParameterAtIndex(ImmutableArray<IArgumentOperation> arguments, int parameterIndex) 122foreach (var argument in arguments)
GenerateDocumentationAndConfigFiles (9)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (7)
39var firstArg = invocation.Arguments.FirstOrDefault(); 503this ImmutableArray<IArgumentOperation> arguments, 505[NotNullWhen(true)] out IArgumentOperation? result) 510foreach (var argument in arguments) 523public static IArgumentOperation GetArgumentForParameterAtIndex( 524this ImmutableArray<IArgumentOperation> arguments, 527if (TryGetArgumentForParameterAtIndex(arguments, parameterIndex, out var result))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)
ILLink.RoslynAnalyzer (9)
DataFlow\FeatureChecksVisitor.cs (1)
42public override FeatureChecksValue VisitArgument(IArgumentOperation operation, StateValue state)
DataFlow\LocalDataFlowVisitor.cs (7)
187return ProcessMethodCall(operation, method, null, ImmutableArray<IArgumentOperation>.Empty, state); 296foreach (var val in propertyRef.Arguments) 659foreach (var val in operation.Arguments) 725public override TValue VisitArgument(IArgumentOperation operation, LocalDataFlowState<TValue, TContext, TValueLattice, TContextLattice> state) 820IArgumentOperation argumentOperation; 854ImmutableArray<IArgumentOperation> arguments, 860foreach (var argument in arguments)
IOperationExtensions.cs (1)
136else if (operation.Parent is IArgumentOperation argumentOperation)
Metrics (9)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (7)
39var firstArg = invocation.Arguments.FirstOrDefault(); 503this ImmutableArray<IArgumentOperation> arguments, 505[NotNullWhen(true)] out IArgumentOperation? result) 510foreach (var argument in arguments) 523public static IArgumentOperation GetArgumentForParameterAtIndex( 524this ImmutableArray<IArgumentOperation> arguments, 527if (TryGetArgumentForParameterAtIndex(arguments, parameterIndex, out var result))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)
Metrics.Legacy (9)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (7)
39var firstArg = invocation.Arguments.FirstOrDefault(); 503this ImmutableArray<IArgumentOperation> arguments, 505[NotNullWhen(true)] out IArgumentOperation? result) 510foreach (var argument in arguments) 523public static IArgumentOperation GetArgumentForParameterAtIndex( 524this ImmutableArray<IArgumentOperation> arguments, 527if (TryGetArgumentForParameterAtIndex(arguments, parameterIndex, out var result))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)
Microsoft.Analyzers.Extra (6)
AsyncCallInsideUsingBlockAnalyzer.cs (1)
209foreach (var argument in invocation.Arguments)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (3)
398var paramsArg = invocationOp.Arguments[details.ArgsParamIndex]; 447var paramsArg = invocationOp.Arguments[details.ArgsParamIndex]; 480foreach (var arg in invocation!.Arguments)
CallAnalysis\Fixers\LegacyLoggingFixer.FixDetails.cs (1)
44var op = invocationOp.Arguments[MessageParamIndex];
UsingToStringInLoggersAnalyzer.cs (1)
64foreach (var arg in invocation.Arguments)
Microsoft.Analyzers.Local (1)
CallAnalysis\ToInvariantString.cs (1)
41var a = op.Arguments[0];
Microsoft.AspNetCore.App.Analyzers (16)
Authorization\AddAuthorizationBuilderAnalyzer.cs (3)
70if (TryGetConfigureArgumentOperation(invocation, out var configureArgumentOperation) 88private static bool TryGetConfigureArgumentOperation(IInvocationOperation invocation, [NotNullWhen(true)] out IArgumentOperation? configureArgumentOperation) 101private static bool TryGetConfigureDelegateCreationOperation(IArgumentOperation configureArgumentOperation, [NotNullWhen(true)] out IDelegateCreationOperation? configureDelegateCreationOperation)
Kestrel\ListenOnIPv6AnyAnalyzer.cs (1)
47var addressArgument = kestrelOptionsListenInvocation?.Arguments.FirstOrDefault();
RenderTreeBuilder\RenderTreeBuilderAnalyzer.cs (1)
39foreach (var argument in invocation.Arguments)
RouteHandlers\DetectAmbiguousRoutes.cs (5)
62if (current.Parent is IArgumentOperation { Parent: IInvocationOperation invocationOperation } && 77IArgumentOperation or 235private static bool AreArgumentsEqual(IMethodSymbol method, ImmutableArray<IArgumentOperation> arguments1, ImmutableArray<IArgumentOperation> arguments2) 271static IOperation? GetParameterArgument(IParameterSymbol parameter, ImmutableArray<IArgumentOperation> arguments)
RouteHandlers\RouteHandlerAnalyzer.cs (4)
78foreach (var argument in invocation.Arguments) 175IArgumentOperation? argumentOperation = null; 176foreach (var argument in invocation.Arguments) 227var builderArgument = operation.Arguments.SingleOrDefault(a => a.Parameter?.Ordinal == 0);
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
187var firstArg = invocation.Arguments.FirstOrDefault();
WebApplicationBuilder\WebApplicationBuilderAnalyzer.cs (1)
366foreach (var argument in invocation.Arguments)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (5)
StaticRouteHandlerModel\InvocationOperationExtensions.cs (5)
32targetOperation.TryGetRouteHandlerArgument(out var routeHandlerParameter) && 45if (invocation.TryGetRouteHandlerArgument(out var argument)) 53public static bool TryGetRouteHandlerArgument(this IInvocationOperation invocation, [NotNullWhen(true)] out IArgumentOperation? argumentOperation) 59foreach (var argument in invocation.Arguments) 85IArgumentOperation argument => ResolveMethodFromOperation(argument.Value, semanticModel),
Microsoft.AspNetCore.Mvc.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
187var firstArg = invocation.Arguments.FirstOrDefault();
Microsoft.AspNetCore.Mvc.Api.Analyzers (3)
ActualApiResponseMetadataFactory.cs (2)
191private static (int? statusCode, ITypeSymbol? returnType) InspectMethodArguments(ImmutableArray<IArgumentOperation> arguments) 196foreach (var argument in arguments)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
187var firstArg = invocation.Arguments.FirstOrDefault();
Microsoft.CodeAnalysis (72)
Generated\OperationKind.Generated.cs (1)
181/// <summary>Indicates an <see cref="IArgumentOperation"/>.</summary>
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,
Operations\DisposeOperationInfo.cs (2)
12public readonly ImmutableArray<IArgumentOperation> DisposeArguments; 14public DisposeOperationInfo(IMethodSymbol? disposeMethod, ImmutableArray<IArgumentOperation> disposeArguments)
Operations\Loops\ForEachLoopOperationInfo.cs (8)
38public readonly ImmutableArray<IArgumentOperation> GetEnumeratorArguments; 39public readonly ImmutableArray<IArgumentOperation> MoveNextArguments; 40public readonly ImmutableArray<IArgumentOperation> CurrentArguments; 41public readonly ImmutableArray<IArgumentOperation> DisposeArguments; 56ImmutableArray<IArgumentOperation> getEnumeratorArguments = default, 57ImmutableArray<IArgumentOperation> moveNextArguments = default, 58ImmutableArray<IArgumentOperation> currentArguments = default, 59ImmutableArray<IArgumentOperation> disposeArguments = default)
Microsoft.CodeAnalysis.Analyzers (42)
FixAnalyzers\FixerWithFixAllAnalyzer.cs (1)
264foreach (var argument in invocation.Arguments)
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)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_IdRangeAndCategoryValidation.cs (3)
67IArgumentOperation argument, 138ImmutableArray<IArgumentOperation> creationArguments, 147foreach (var argument in creationArguments)
MetaAnalyzers\DiagnosticDescriptorCreationAnalyzer_ReleaseTracking.cs (1)
276IArgumentOperation ruleIdArgument,
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (1)
117ImmutableArray<IArgumentOperation> arguments, bool isUsedAsExtensionMethod, Func<SyntaxGenerator, IEnumerable<SyntaxNode>, SyntaxNode> getReplacementNode,
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (7)
39var firstArg = invocation.Arguments.FirstOrDefault(); 503this ImmutableArray<IArgumentOperation> arguments, 505[NotNullWhen(true)] out IArgumentOperation? result) 510foreach (var argument in arguments) 523public static IArgumentOperation GetArgumentForParameterAtIndex( 524this ImmutableArray<IArgumentOperation> arguments, 527if (TryGetArgumentForParameterAtIndex(arguments, parameterIndex, out var result))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)
Microsoft.CodeAnalysis.AnalyzerUtilities (82)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (7)
39var firstArg = invocation.Arguments.FirstOrDefault(); 503this ImmutableArray<IArgumentOperation> arguments, 505[NotNullWhen(true)] out IArgumentOperation? result) 510foreach (var argument in arguments) 523public static IArgumentOperation GetArgumentForParameterAtIndex( 524this ImmutableArray<IArgumentOperation> arguments, 527if (TryGetArgumentForParameterAtIndex(arguments, parameterIndex, out var result))
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysis.CopyDataFlowOperationVisitor.cs (1)
317protected override CopyAbstractValue ComputeAnalysisValueForEscapedRefOrOutArgument(AnalysisEntity analysisEntity, IArgumentOperation operation, CopyAbstractValue defaultValue)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysis.DisposeDataFlowOperationVisitor.cs (3)
188protected override DisposeAbstractValue ComputeAnalysisValueForEscapedRefOrOutArgument(IArgumentOperation operation, DisposeAbstractValue defaultValue) 260ImmutableArray<IArgumentOperation> visitedArguments, 327protected override void PostProcessArgument(IArgumentOperation operation, bool isEscaped)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\DisposeAnalysis\DisposeAnalysisHelper.cs (1)
161operation.Parent is IArgumentOperation argument && argument.Parameter?.RefKind == RefKind.Out) &&
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\GlobalFlowStateAnalysis\GlobalFlowStateValueSetFlowOperationVisitor.cs (1)
111ImmutableArray<IArgumentOperation> visitedArguments,
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ParameterValidationAnalysis\ParameterValidationAnalysis.ParameterValidationDataFlowOperationVisitor.cs (6)
253ImmutableArray<IArgumentOperation> visitedArguments, 265ImmutableArray<IArgumentOperation> visitedArguments, 276ImmutableArray<IArgumentOperation> visitedArguments, 285private void ProcessRegularInvocationOrCreation(IMethodSymbol? targetMethod, ImmutableArray<IArgumentOperation> arguments, IOperation operation) 324foreach (var argument in arguments) 343foreach (var argument in arguments)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysis.PointsToDataFlowOperationVisitor.cs (6)
287protected override PointsToAbstractValue ComputeAnalysisValueForEscapedRefOrOutArgument(AnalysisEntity analysisEntity, IArgumentOperation operation, PointsToAbstractValue defaultValue) 300protected override void PostProcessArgument(IArgumentOperation operation, bool isEscaped) 943ImmutableArray<IArgumentOperation> visitedArguments, 954foreach (var argument in visitedArguments) 1028ImmutableArray<IArgumentOperation> visitedArguments, 1038ImmutableArray<IArgumentOperation> visitedArguments,
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\SourceInfo.cs (1)
16internal delegate bool MethodMatcher(string methodName, ImmutableArray<IArgumentOperation> arguments);
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\Analysis\TaintedDataAnalysis\TaintedDataSymbolMapExtensions.cs (2)
37ImmutableArray<IArgumentOperation> arguments, 185ImmutableArray<IArgumentOperation> arguments,
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\ValueContentAnalysis\ValueContentAnalysis.ValueContentDataFlowOperationVisitor.cs (1)
273ImmutableArray<IArgumentOperation> visitedArguments,
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AbstractLocation.cs (2)
163_ => ImmutableArray<IArgumentOperation>.Empty, 166foreach (var argument in arguments)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AbstractLocationDataFlowOperationVisitor.cs (1)
67protected override TAbstractAnalysisValue ComputeAnalysisValueForEscapedRefOrOutArgument(IArgumentOperation operation, TAbstractAnalysisValue defaultValue)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (2)
64protected sealed override TAbstractAnalysisValue ComputeAnalysisValueForEscapedRefOrOutArgument(IArgumentOperation operation, TAbstractAnalysisValue defaultValue) 80protected virtual TAbstractAnalysisValue ComputeAnalysisValueForEscapedRefOrOutArgument(AnalysisEntity analysisEntity, IArgumentOperation operation, TAbstractAnalysisValue defaultValue)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityFactory.cs (1)
198case IArgumentOperation argument:
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,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)
Microsoft.CodeAnalysis.BannedApiAnalyzers (9)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (7)
39var firstArg = invocation.Arguments.FirstOrDefault(); 503this ImmutableArray<IArgumentOperation> arguments, 505[NotNullWhen(true)] out IArgumentOperation? result) 510foreach (var argument in arguments) 523public static IArgumentOperation GetArgumentForParameterAtIndex( 524this ImmutableArray<IArgumentOperation> arguments, 527if (TryGetArgumentForParameterAtIndex(arguments, parameterIndex, out var result))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)
Microsoft.CodeAnalysis.CodeStyle (5)
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationDiagnosticAnalyzer.cs (1)
60conversion.Parent is IArgumentOperation { Parent: IInvocationOperation invocation } &&
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (2)
174return Unwrap(interpolatedStringOperation?.Parent, towardsParent: true) is IArgumentOperation 261private static bool IsSpaceChar(IArgumentOperation argument)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)
Microsoft.CodeAnalysis.CSharp (24)
Operations\CSharpOperationFactory.cs (12)
457ImmutableArray<IArgumentOperation> arguments = DeriveArguments(boundCall); 615var arguments = ImmutableArray<IArgumentOperation>.Empty; 637ImmutableArray<IArgumentOperation> arguments = DeriveArguments(boundIndexerAccess); 730ImmutableArray<IArgumentOperation> arguments = DeriveArguments(boundObjectCreationExpression); 879ImmutableArray<IArgumentOperation> arguments; 897arguments = ImmutableArray<IArgumentOperation>.Empty; 927ImmutableArray<IArgumentOperation> arguments = DeriveArguments(boundCollectionElementInitializer); 1932ImmutableArray<IArgumentOperation> createArgumentOperations(MethodArgumentInfo? info) 1940return ImmutableArray<IArgumentOperation>.Empty; 2907reference = new PropertyReferenceOperation(property.GetPublicSymbol(), constrainedToType: null, ImmutableArray<IArgumentOperation>.Empty, 2940private ImmutableArray<IArgumentOperation> CreateDisposeArguments(MethodArgumentInfo patternDisposeInfo) 2947return ImmutableArray<IArgumentOperation>.Empty;
Operations\CSharpOperationFactory_Methods.cs (12)
36internal IArgumentOperation CreateArgumentOperation(ArgumentKind kind, IParameterSymbol? parameter, BoundExpression expression) 194internal ImmutableArray<IArgumentOperation> DeriveArguments(BoundNode containingExpression) 264private ImmutableArray<IArgumentOperation> DeriveArguments( 276return ImmutableArray<IArgumentOperation>.Empty; 288private static ImmutableArray<IArgumentOperation> MakeArgumentsInEvaluationOrder( 308ArrayBuilder<IArgumentOperation> argumentsBuilder = ArrayBuilder<IArgumentOperation>.GetInstance(arguments.Length); 359private static ImmutableArray<IArgumentOperation> BuildArgumentsInEvaluationOrder( 368ArrayBuilder<IArgumentOperation> argumentsInEvaluationBuilder = ArrayBuilder<IArgumentOperation>.GetInstance(parameters.Length); 443arguments: ImmutableArray<IArgumentOperation>.Empty, 455ImmutableArray<IArgumentOperation>.Empty,
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\SimplifyLinqExpression\CSharpSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
24=> invocation.Parent is IArgumentOperation { Parent: IInvocationOperation nextInvocation } ? nextInvocation : null;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1504var argument = invocationOperation.Arguments.FirstOrDefault(a => Equals(originalParameter, a.Parameter));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
239var argumentOp = invocationOp.Arguments.FirstOrDefault(a => a.Syntax == argument);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (5)
46Arguments: [IArgumentOperation { Value: IOperation arg }] 299IInvocationOperation { Arguments: ImmutableArray<IArgumentOperation> args }) 303foreach (var arg in args) 373Arguments: ImmutableArray<IArgumentOperation> { IsEmpty: true }, 632Arguments: [IArgumentOperation { Value: IOperation arg }]
Microsoft.CodeAnalysis.CSharp.Features (6)
src\Analyzers\CSharp\Analyzers\SimplifyLinqExpression\CSharpSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
24=> invocation.Parent is IArgumentOperation { Parent: IInvocationOperation nextInvocation } ? nextInvocation : null;
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (5)
46Arguments: [IArgumentOperation { Value: IOperation arg }] 299IInvocationOperation { Arguments: ImmutableArray<IArgumentOperation> args }) 303foreach (var arg in args) 373Arguments: ImmutableArray<IArgumentOperation> { IsEmpty: true }, 632Arguments: [IArgumentOperation { Value: IOperation arg }]
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests_IArgument.cs (2)
3069var argument = invocation.Arguments[0]; 4157foreach (var argument in operation.Arguments)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1504var argument = invocationOperation.Arguments.FirstOrDefault(a => Equals(originalParameter, a.Parameter));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
239var argumentOp = invocationOp.Arguments.FirstOrDefault(a => a.Syntax == argument);
Microsoft.CodeAnalysis.Features (14)
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
5688? (oldModel.RequiredModel.GetOperation(oldLambda.Parent, cancellationToken) as IArgumentOperation)?.Parameter
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (5)
430private static async Task<ImmutableArray<IArgumentOperation>> GetArgumentsReadOnlyOnceAsync( 432ImmutableArray<IArgumentOperation> arguments, 436using var _ = ArrayBuilder<IArgumentOperation>.GetInstance(out var builder); 437foreach (var argument in arguments) 497IArgumentOperation argumentOperation)
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationDiagnosticAnalyzer.cs (1)
60conversion.Parent is IArgumentOperation { Parent: IInvocationOperation invocation } &&
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (2)
174return Unwrap(interpolatedStringOperation?.Parent, towardsParent: true) is IArgumentOperation 261private static bool IsSpaceChar(IArgumentOperation argument)
ValueTracking\ValueTracker.OperationCollector.cs (5)
31IArgumentOperation argumentOperation => ShouldTrackArgument(argumentOperation) ? VisitAsync(argumentOperation.Value, cancellationToken) : Task.CompletedTask, 118if (IsContainedIn<IArgumentOperation>(operation, out var argumentOperation) && argumentOperation.Parameter is not null) 181private async Task TrackArgumentsAsync(ImmutableArray<IArgumentOperation> argumentOperations, CancellationToken cancellationToken) 228private static bool ShouldTrackArgument(IArgumentOperation argumentOperation)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (9)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (7)
39var firstArg = invocation.Arguments.FirstOrDefault(); 503this ImmutableArray<IArgumentOperation> arguments, 505[NotNullWhen(true)] out IArgumentOperation? result) 510foreach (var argument in arguments) 523public static IArgumentOperation GetArgumentForParameterAtIndex( 524this ImmutableArray<IArgumentOperation> arguments, 527if (TryGetArgumentForParameterAtIndex(arguments, parameterIndex, out var result))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)
Microsoft.CodeAnalysis.PublicApiAnalyzers (9)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (7)
39var firstArg = invocation.Arguments.FirstOrDefault(); 503this ImmutableArray<IArgumentOperation> arguments, 505[NotNullWhen(true)] out IArgumentOperation? result) 510foreach (var argument in arguments) 523public static IArgumentOperation GetArgumentForParameterAtIndex( 524this ImmutableArray<IArgumentOperation> arguments, 527if (TryGetArgumentForParameterAtIndex(arguments, parameterIndex, out var result))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)
Microsoft.CodeAnalysis.ResxSourceGenerator (9)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (7)
39var firstArg = invocation.Arguments.FirstOrDefault(); 503this ImmutableArray<IArgumentOperation> arguments, 505[NotNullWhen(true)] out IArgumentOperation? result) 510foreach (var argument in arguments) 523public static IArgumentOperation GetArgumentForParameterAtIndex( 524this ImmutableArray<IArgumentOperation> arguments, 527if (TryGetArgumentForParameterAtIndex(arguments, parameterIndex, out var result))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)
Microsoft.CodeAnalysis.Test.Utilities (18)
Compilation\ControlFlowGraphVerifier.cs (1)
901while (containingArgument is not (null or IArgumentOperation));
Compilation\OperationTreeVerifier.cs (3)
831private void VisitArguments(ImmutableArray<IArgumentOperation> arguments) 893public override void VisitArgument(IArgumentOperation operation) 895LogString($"{nameof(IArgumentOperation)} (");
Compilation\TestOperationVisitor.cs (5)
346void visitArguments(ImmutableArray<IArgumentOperation> arguments) 350foreach (IArgumentOperation arg in arguments) 473foreach (var arg in disposeArgs) 577public override void VisitArgument(IArgumentOperation operation) 1810foreach (var arg in disposeArgs)
Diagnostics\CouldHaveMoreSpecificTypeAnalyzer.cs (1)
88foreach (IArgumentOperation argument in invocation.Arguments)
Diagnostics\FieldCouldBeReadOnlyAnalyzer.cs (1)
76foreach (IArgumentOperation argument in invocation.Arguments)
Diagnostics\LocalCouldBeConstAnalyzer.cs (1)
69foreach (IArgumentOperation argument in invocation.Arguments)
Diagnostics\OperationTestAnalyzer.cs (6)
545foreach (IArgumentOperation argument in invocation.Arguments) 667var argument = (IArgumentOperation)operationContext.Operation; 1102foreach (IArgumentOperation argument in invocation.Arguments) 1129foreach (IArgumentOperation argument in creation.Arguments) 1737if (((IArgumentOperation)operation).ArgumentKind == ArgumentKind.ParamArray)
Microsoft.CodeAnalysis.VisualBasic (8)
VisualBasicExtensions.vb (8)
1398''' Gets the underlying <see cref="Conversion"/> information for InConversion of <see cref="IArgumentOperation"/> that was created from Visual Basic code. 1402''' <exception cref="ArgumentException">If the <see cref="IArgumentOperation"/> was not created from Visual Basic code.</exception> 1404Public Function GetInConversion(argument As IArgumentOperation) As Conversion 1410NameOf(IArgumentOperation)), 1416''' Gets the underlying <see cref="Conversion"/> information for OutConversion of <see cref="IArgumentOperation"/> that was created from Visual Basic code. 1420''' <exception cref="ArgumentException">If the <see cref="IArgumentOperation"/> was not created from Visual Basic code.</exception> 1422Public Function GetOutConversion(argument As IArgumentOperation) As Conversion 1428NameOf(IArgumentOperation)),
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)
Microsoft.Extensions.Validation.ValidationsGenerator (5)
src\Http\Http.Extensions\gen\Microsoft.AspNetCore.Http.RequestDelegateGenerator\StaticRouteHandlerModel\InvocationOperationExtensions.cs (5)
32targetOperation.TryGetRouteHandlerArgument(out var routeHandlerParameter) && 45if (invocation.TryGetRouteHandlerArgument(out var argument)) 53public static bool TryGetRouteHandlerArgument(this IInvocationOperation invocation, [NotNullWhen(true)] out IArgumentOperation? argumentOperation) 59foreach (var argument in invocation.Arguments) 85IArgumentOperation argument => ResolveMethodFromOperation(argument.Value, semanticModel),
Microsoft.Interop.ComInterfaceGenerator (4)
src\libraries\System.Runtime.InteropServices\gen\Common\OperationExtensions.cs (4)
12public static IArgumentOperation? GetArgumentByOrdinal(this IInvocationOperation operation, int ordinal) 19foreach (IArgumentOperation argument in operation.Arguments) 28public static IArgumentOperation? GetArgumentByOrdinal(this IObjectCreationOperation operation, int ordinal) 35foreach (IArgumentOperation argument in operation.Arguments)
Microsoft.Interop.LibraryImportGenerator (8)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (3)
649IArgumentOperation? managedTypeArgument = attrCreation.GetArgumentByOrdinal(0); 670IArgumentOperation? marshallerTypeArgument = attrCreation.GetArgumentByOrdinal(2); 688var marshalModeArgument = attrCreation.GetArgumentByOrdinal(1);
Analyzers\NativeMarshallingAttributeAnalyzer.cs (1)
90IArgumentOperation marshallerEntryPointTypeArgument = attrCreation.GetArgumentByOrdinal(0);
src\libraries\System.Runtime.InteropServices\gen\Common\OperationExtensions.cs (4)
12public static IArgumentOperation? GetArgumentByOrdinal(this IInvocationOperation operation, int ordinal) 19foreach (IArgumentOperation argument in operation.Arguments) 28public static IArgumentOperation? GetArgumentByOrdinal(this IObjectCreationOperation operation, int ordinal) 35foreach (IArgumentOperation argument in operation.Arguments)
Microsoft.Interop.LibraryImportGenerator.Downlevel (4)
src\libraries\System.Runtime.InteropServices\gen\Common\OperationExtensions.cs (4)
12public static IArgumentOperation? GetArgumentByOrdinal(this IInvocationOperation operation, int ordinal) 19foreach (IArgumentOperation argument in operation.Arguments) 28public static IArgumentOperation? GetArgumentByOrdinal(this IObjectCreationOperation operation, int ordinal) 35foreach (IArgumentOperation argument in operation.Arguments)
Roslyn.Diagnostics.Analyzers (10)
AbstractDoNotCopyValue.cs (1)
393public override void VisitArgument(IArgumentOperation operation)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (7)
39var firstArg = invocation.Arguments.FirstOrDefault(); 503this ImmutableArray<IArgumentOperation> arguments, 505[NotNullWhen(true)] out IArgumentOperation? result) 510foreach (var argument in arguments) 523public static IArgumentOperation GetArgumentForParameterAtIndex( 524this ImmutableArray<IArgumentOperation> arguments, 527if (TryGetArgumentForParameterAtIndex(arguments, parameterIndex, out var result))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)
Roslyn.Diagnostics.CSharp.Analyzers (3)
CSharpDoNotUseDebugAssertForInterpolatedStrings.cs (1)
68invocation.Arguments is [_, IArgumentOperation { Value: IInterpolatedStringOperation { ConstantValue.HasValue: false } }])
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Simplification\Simplifiers\CastSimplifier.cs (1)
1504var argument = invocationOperation.Arguments.FirstOrDefault(a => Equals(originalParameter, a.Parameter));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
239var argumentOp = invocationOp.Arguments.FirstOrDefault(a => a.Syntax == argument);
System.Text.RegularExpressions.Generator (9)
UpgradeToGeneratedRegexAnalyzer.cs (2)
152private static bool ValidateParameters(ImmutableArray<IArgumentOperation> arguments) 164IArgumentOperation argument = arguments[i];
UpgradeToGeneratedRegexCodeFixer.cs (7)
161ImmutableArray<IArgumentOperation> operationArguments; 255static string? GetRegexPatternFromArgument(ImmutableArray<IArgumentOperation> arguments) 257IArgumentOperation? patternArgument = arguments.SingleOrDefault(arg => arg.Parameter?.Name == UpgradeToGeneratedRegexAnalyzer.PatternArgumentName); 266static RegexOptions GetRegexOptionsFromArgument(ImmutableArray<IArgumentOperation> arguments) 268IArgumentOperation? optionsArgument = arguments.SingleOrDefault(arg => arg.Parameter?.Name == UpgradeToGeneratedRegexAnalyzer.OptionsArgumentName); 276static SyntaxNode? GetNode(ImmutableArray<IArgumentOperation> arguments, SyntaxGenerator generator, string parameterName) 278IArgumentOperation? argument = arguments.SingleOrDefault(arg => arg.Parameter?.Name == parameterName);
Test.Utilities (9)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (7)
39var firstArg = invocation.Arguments.FirstOrDefault(); 503this ImmutableArray<IArgumentOperation> arguments, 505[NotNullWhen(true)] out IArgumentOperation? result) 510foreach (var argument in arguments) 523public static IArgumentOperation GetArgumentForParameterAtIndex( 524this ImmutableArray<IArgumentOperation> arguments, 527if (TryGetArgumentForParameterAtIndex(arguments, parameterIndex, out var result))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)
Text.Analyzers (9)
src\RoslynAnalyzers\Utilities\Compiler\Extensions\IOperationExtensions.cs (7)
39var firstArg = invocation.Arguments.FirstOrDefault(); 503this ImmutableArray<IArgumentOperation> arguments, 505[NotNullWhen(true)] out IArgumentOperation? result) 510foreach (var argument in arguments) 523public static IArgumentOperation GetArgumentForParameterAtIndex( 524this ImmutableArray<IArgumentOperation> arguments, 527if (TryGetArgumentForParameterAtIndex(arguments, parameterIndex, out var result))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
162else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
358public override void VisitArgument(IArgumentOperation operation)