1 implementation of Arguments
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
5168public ImmutableArray<IArgumentOperation> Arguments { get; }
121 references to Arguments
Aspire.Hosting.Analyzers (1)
AppHostAnalyzer.cs (1)
122foreach (var argument in invocation.Arguments)
ConfigurationSchemaGenerator (3)
RuntimeSource\Configuration.Binder\Parser\ConfigurationBinder.cs (3)
81IArgumentOperation instanceArg = GetArgumentForParameterAtIndex(operation.Arguments, instanceIndex); 172ITypeOfOperation? typeOfOperation = GetArgumentForParameterAtIndex(operation.Arguments, 1).ChildOperations.FirstOrDefault() as ITypeOfOperation; 227ITypeOfOperation? typeOfOperation = GetArgumentForParameterAtIndex(operation.Arguments, 1).ChildOperations.FirstOrDefault() as ITypeOfOperation;
ILLink.RoslynAnalyzer (2)
DataFlow\LocalDataFlowVisitor.cs (2)
553 => ProcessMethodCall (operation, operation.TargetMethod, operation.Instance, operation.Arguments, state); 774 argumentOperation = callOperation.Arguments[argumentIndex];
Microsoft.Analyzers.Extra (16)
AsyncCallInsideUsingBlockAnalyzer.cs (1)
209foreach (var argument in invocation.Arguments)
CallAnalysis\CallAnalyzer.Handlers.cs (1)
30if (op.Arguments.Length == target.Parameters.Length)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (7)
366var t = invocationOp.Arguments[0].Value.Type!; 386parameters.Add(gen.ParameterDeclaration("exception", gen.TypeExpression(invocationOp.Arguments[details.ExceptionParamIndex].Value.Type!))); 398var paramsArg = invocationOp.Arguments[details.ArgsParamIndex]; 431invocationOp.Arguments[0].Value.Type! 436args.Add(invocationOp.Arguments[details.ExceptionParamIndex].Value.Type!); 447var paramsArg = invocationOp.Arguments[details.ArgsParamIndex]; 480foreach (var arg in invocation!.Arguments)
CallAnalysis\Fixers\LegacyLoggingFixer.FixDetails.cs (2)
44var op = invocationOp.Arguments[MessageParamIndex]; 106var op = invocationOp.Arguments[LogLevelParamIndex].Descendants().SingleOrDefault(x => x.Kind == OperationKind.Literal || x.Kind == OperationKind.FieldReference);
CallAnalysis\StartsEndsWith.cs (4)
46var s = op.Arguments[0].Value.ConstantValue.Value as string; 50if (op.Arguments.Length > 1 && op.Arguments[1].Value.ConstantValue.HasValue) 52var comp = (StringComparison)op.Arguments[1].Value.ConstantValue.Value!;
UsingToStringInLoggersAnalyzer.cs (1)
64foreach (var arg in invocation.Arguments)
Microsoft.Analyzers.Local (2)
CallAnalysis\CallAnalyzer.Handlers.cs (1)
30if (op.Arguments.Length == target.Parameters.Length)
CallAnalysis\ToInvariantString.cs (1)
41var a = op.Arguments[0];
Microsoft.AspNetCore.Analyzers (4)
MiddlewareAnalyzer.cs (2)
35invocation.Arguments.Length >= 1 && 36SymbolEqualityComparer.Default.Equals(invocation.Arguments[0].Parameter?.Type, _context.StartupSymbols.IApplicationBuilder))
ServicesAnalyzer.cs (2)
30invocation.Arguments.Length >= 1 && 31SymbolEqualityComparer.Default.Equals(invocation.Arguments[0].Parameter?.Type, _context.StartupSymbols.IServiceCollection))
Microsoft.AspNetCore.App.Analyzers (13)
Authorization\AddAuthorizationBuilderAnalyzer.cs (1)
92if (invocation is { Arguments: { Length: 2 } invocationArguments })
Kestrel\ListenOnIPv6AnyAnalyzer.cs (1)
47var addressArgument = kestrelOptionsListenInvocation?.Arguments.FirstOrDefault();
RenderTreeBuilder\RenderTreeBuilderAnalyzer.cs (1)
39foreach (var argument in invocation.Arguments)
RouteHandlers\DetectAmbiguousRoutes.cs (4)
199invocation.Arguments.Length == 2 && 200otherInvocation.Arguments.Length == 2) 206return AreArgumentsEqual(invocation.TargetMethod, invocation.Arguments, otherInvocation.Arguments);
RouteHandlers\RouteHandlerAnalyzer.cs (4)
78foreach (var argument in invocation.Arguments) 176foreach (var argument in invocation.Arguments) 202invocation.Arguments.Length == 3 && 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 (4)
RequestDelegateGenerator.cs (2)
71if (endpoint.HttpMethod != "MapFallback" || endpoint.Operation.Arguments.Length != 2) 141if (endpoint.HttpMethod != "MapFallback" && endpoint.Operation.Arguments.Length != 2)
StaticRouteHandlerModel\InvocationOperationExtensions.cs (2)
58var routeHandlerArgumentOrdinal = invocation.Arguments.Length - 1; 59foreach (var argument in invocation.Arguments)
Microsoft.AspNetCore.Mvc.Analyzers (1)
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
187var firstArg = invocation.Arguments.FirstOrDefault();
Microsoft.AspNetCore.Mvc.Api.Analyzers (2)
ActualApiResponseMetadataFactory.cs (1)
122var result = InspectMethodArguments(invocation.Arguments);
src\Shared\Roslyn\CodeAnalysisExtensions.cs (1)
187var firstArg = invocation.Arguments.FirstOrDefault();
Microsoft.CodeAnalysis (1)
Operations\ControlFlowGraphBuilder.cs (1)
5931(IOperation? visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments) = VisitInstanceWithArguments(instance, operation.Arguments);
Microsoft.CodeAnalysis.CodeStyle (10)
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (2)
80invocation.Arguments.Length == 1) 85return TryAddHashedSymbol(invocation.Arguments[0].Value, seenHash: true);
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (8)
87if (invocation.Arguments.Length == 1 88|| (invocation.Arguments.Length == 2 && UsesInvariantCultureReferenceInsideFormattableStringInvariant(invocation, formatProviderArgumentIndex: 1))) 90if (invocation.Arguments[0].Value is ILiteralOperation { ConstantValue: { HasValue: true, Value: string value } } literal && 105|| (invocation.Arguments.Length == 1 && UsesInvariantCultureReferenceInsideFormattableStringInvariant(invocation, formatProviderArgumentIndex: 0))) 133return IsInvariantCultureReference(invocation.Arguments[formatProviderArgumentIndex].Value) 202var argCount = invocation.Arguments.Length; 206IsSpaceChar(invocation.Arguments[1])) 208var alignmentOp = invocation.Arguments[0].Value;
Microsoft.CodeAnalysis.CSharp.CodeStyle (12)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (2)
104if (invocationOperation.Arguments.Length != 1) 111invocationOperation.Arguments[0].Value,
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (8)
106return invocation.Arguments.Length switch 126var startOperation = invocation.Arguments[0].Value; 168var startOperation = invocation.Arguments[0].Value; 169var lengthOperation = invocation.Arguments[1].Value; 233if (!IsSubtraction(invocation.Arguments[1].Value, out var subtraction) || 244var startOperation = invocation.Arguments[0].Value; 283var startOperation = invocation.Arguments[0].Value; 300invocation.Arguments[1].Value);
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 (4)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (4)
46Arguments: [IArgumentOperation { Value: IOperation arg }] 299IInvocationOperation { Arguments: ImmutableArray<IArgumentOperation> args }) 633Arguments: [IArgumentOperation { Value: IOperation arg }] 770Arguments: [IMemberReferenceOperation arg]
Microsoft.CodeAnalysis.CSharp.Features (14)
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseIndexOperatorDiagnosticAnalyzer.cs (2)
104if (invocationOperation.Arguments.Length != 1) 111invocationOperation.Arguments[0].Value,
src\Analyzers\CSharp\Analyzers\UseIndexOrRangeOperator\CSharpUseRangeOperatorDiagnosticAnalyzer.cs (8)
106return invocation.Arguments.Length switch 126var startOperation = invocation.Arguments[0].Value; 168var startOperation = invocation.Arguments[0].Value; 169var lengthOperation = invocation.Arguments[1].Value; 233if (!IsSubtraction(invocation.Arguments[1].Value, out var subtraction) || 244var startOperation = invocation.Arguments[0].Value; 283var startOperation = invocation.Arguments[0].Value; 300invocation.Arguments[1].Value);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordHelpers.cs (4)
46Arguments: [IArgumentOperation { Value: IOperation arg }] 299IInvocationOperation { Arguments: ImmutableArray<IArgumentOperation> args }) 633Arguments: [IArgumentOperation { Value: IOperation arg }] 770Arguments: [IMemberReferenceOperation arg]
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (1)
IOperation\IOperationTests_IArgument.cs (1)
3069var argument = invocation.Arguments[0];
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 (15)
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (2)
297invocation.Arguments.Length == 1 && 298IsParameterReference(invocation.Arguments[0].Value, parameter))
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (1)
163var allArgumentOperations = invocationOperation.Arguments;
src\Analyzers\Core\Analyzers\Helpers\HashCodeAnalyzer\HashCodeAnalyzer.OperationDeconstructor.cs (2)
80invocation.Arguments.Length == 1) 85return TryAddHashedSymbol(invocation.Arguments[0].Value, seenHash: true);
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (8)
87if (invocation.Arguments.Length == 1 88|| (invocation.Arguments.Length == 2 && UsesInvariantCultureReferenceInsideFormattableStringInvariant(invocation, formatProviderArgumentIndex: 1))) 90if (invocation.Arguments[0].Value is ILiteralOperation { ConstantValue: { HasValue: true, Value: string value } } literal && 105|| (invocation.Arguments.Length == 1 && UsesInvariantCultureReferenceInsideFormattableStringInvariant(invocation, formatProviderArgumentIndex: 0))) 133return IsInvariantCultureReference(invocation.Arguments[formatProviderArgumentIndex].Value) 202var argCount = invocation.Arguments.Length; 206IsSpaceChar(invocation.Arguments[1])) 208var alignmentOp = invocation.Arguments[0].Value;
ValueTracking\ValueTracker.FindReferencesProgress.cs (1)
190if (invocationOperation.Arguments.Any(
ValueTracking\ValueTracker.OperationCollector.cs (1)
107await TrackArgumentsAsync(invocationOperation.Arguments, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Test.Utilities (8)
Compilation\OperationTreeVerifier.cs (1)
837VisitArguments(operation.Arguments);
Compilation\TestOperationVisitor.cs (2)
544children = new[] { operation.Instance }.Concat(operation.Arguments); 548children = operation.Arguments;
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 (2)
545foreach (IArgumentOperation argument in invocation.Arguments) 1102foreach (IArgumentOperation argument in invocation.Arguments)
Microsoft.Interop.ComInterfaceGenerator (1)
src\libraries\System.Runtime.InteropServices\gen\Common\OperationExtensions.cs (1)
19foreach (IArgumentOperation argument in operation.Arguments)
Microsoft.Interop.LibraryImportGenerator (1)
src\libraries\System.Runtime.InteropServices\gen\Common\OperationExtensions.cs (1)
19foreach (IArgumentOperation argument in operation.Arguments)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\libraries\System.Runtime.InteropServices\gen\Common\OperationExtensions.cs (1)
19foreach (IArgumentOperation argument in operation.Arguments)
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (1)
IOperation\IOperationTests_IArgument.vb (1)
1094Dim argument = invocation.Arguments(0)
System.Text.RegularExpressions.Generator (2)
UpgradeToGeneratedRegexAnalyzer.cs (1)
105if (!ValidateParameters(invocationOperation.Arguments))
UpgradeToGeneratedRegexCodeFixer.cs (1)
164operationArguments = invocationOperation.Arguments;