1 implementation of IArgumentOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
7912internal sealed partial class ArgumentOperation : Operation, IArgumentOperation
228 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)
ILLink.RoslynAnalyzer (9)
DataFlow\FeatureChecksVisitor.cs (1)
43 public override FeatureChecksValue VisitArgument (IArgumentOperation operation, StateValue state)
DataFlow\LocalDataFlowVisitor.cs (7)
183 return ProcessMethodCall (operation, method, null, ImmutableArray<IArgumentOperation>.Empty, state); 278 foreach (var val in propertyRef.Arguments) 615 foreach (var val in operation.Arguments) 679 public override TValue VisitArgument (IArgumentOperation operation, LocalDataFlowState<TValue, TContext, TValueLattice, TContextLattice> state) 771 IArgumentOperation argumentOperation; 803 ImmutableArray<IArgumentOperation> arguments, 809 foreach (var argument in arguments) {
IOperationExtensions.cs (1)
124 } else if (operation.Parent is IArgumentOperation argumentOperation) {
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.CodeStyle (4)
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (2)
162return Unwrap(interpolatedStringOperation?.Parent, towardsParent: true) is IArgumentOperation 247private static bool IsSpaceChar(IArgumentOperation argument)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
159else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
359public 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)
1462var 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 }, 633Arguments: [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 }, 633Arguments: [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)
1462var 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 (12)
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\AbstractSimplifyInterpolationHelpers.cs (2)
162return Unwrap(interpolatedStringOperation?.Parent, towardsParent: true) is IArgumentOperation 247private 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.Test.Utilities (16)
Compilation\ControlFlowGraphVerifier.cs (1)
901while (containingArgument is not (null or IArgumentOperation));
Compilation\OperationTreeVerifier.cs (3)
849private void VisitArguments(ImmutableArray<IArgumentOperation> arguments) 911public override void VisitArgument(IArgumentOperation operation) 913LogString($"{nameof(IArgumentOperation)} (");
Compilation\TestOperationVisitor.cs (3)
345void visitArguments(ImmutableArray<IArgumentOperation> arguments) 349foreach (IArgumentOperation arg in arguments) 576public override void VisitArgument(IArgumentOperation operation)
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)
159else if (operation.Parent is IArgumentOperation argumentOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (1)
359public override void VisitArgument(IArgumentOperation operation)
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)
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);