1 implementation of IArgumentOperation
Microsoft.CodeAnalysis (1)
Generated\Operations.Generated.cs (1)
7539internal sealed partial class ArgumentOperation : Operation, IArgumentOperation
170 references to IArgumentOperation
Microsoft.CodeAnalysis (69)
Generated\OperationKind.Generated.cs (1)
181/// <summary>Indicates an <see cref="IArgumentOperation"/>.</summary>
Generated\Operations.Generated.cs (18)
621ImmutableArray<IArgumentOperation> Arguments { get; } 741ImmutableArray<IArgumentOperation> Arguments { get; } 936ImmutableArray<IArgumentOperation> Arguments { get; } 1200ImmutableArray<IArgumentOperation> Arguments { get; } 3488ImmutableArray<IArgumentOperation> Arguments { get; } 4637internal RaiseEventOperation(IEventReferenceOperation eventReference, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, bool isImplicit) 4644public ImmutableArray<IArgumentOperation> Arguments { get; } 4781internal InvocationOperation(IMethodSymbol targetMethod, ITypeSymbol? constrainedToType, IOperation? instance, bool isVirtual, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 4795public ImmutableArray<IArgumentOperation> Arguments { get; } 5083internal PropertyReferenceOperation(IPropertySymbol property, ITypeSymbol? constrainedToType, ImmutableArray<IArgumentOperation> arguments, IOperation? instance, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 5093public ImmutableArray<IArgumentOperation> Arguments { get; } 5544internal ObjectCreationOperation(IMethodSymbol? constructor, IObjectOrCollectionInitializerOperation? initializer, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, ConstantValue? constantValue, bool isImplicit) 5555public ImmutableArray<IArgumentOperation> Arguments { get; } 9917internal FunctionPointerInvocationOperation(IOperation target, ImmutableArray<IArgumentOperation> arguments, SemanticModel? semanticModel, SyntaxNode syntax, ITypeSymbol? type, bool isImplicit) 9925public ImmutableArray<IArgumentOperation> Arguments { get; } 10606public override IOperation VisitArgument(IArgumentOperation operation, object? argument) 10928public virtual void VisitArgument(IArgumentOperation operation) => DefaultVisit(operation); 11064public virtual TResult? VisitArgument(IArgumentOperation operation, TArgument argument) => DefaultVisit(operation, argument);
Operations\ControlFlowGraphBuilder.cs (40)
2029private ImmutableArray<IArgumentOperation> VisitArguments(ImmutableArray<IArgumentOperation> arguments, bool instancePushed) 2037private void VisitAndPushArguments(ImmutableArray<IArgumentOperation> arguments, bool instancePushed) 2084private IArgumentOperation RewriteArgumentFromArray(IOperation visitedArgument, int index, ImmutableArray<IArgumentOperation> args) 3327ImmutableArray<IArgumentOperation>.Empty, semanticModel: null, value.Syntax, 3938private void HandleUsingOperationParts(IOperation resources, IOperation body, IMethodSymbol? disposeMethod, ImmutableArray<IArgumentOperation> disposeArguments, ImmutableArray<ILocalSymbol> locals, bool isAsynchronous) 4092private void AddDisposingFinally(IOperation resource, bool requiresRuntimeConversion, ITypeSymbol iDisposable, IMethodSymbol? disposeMethod, ImmutableArray<IArgumentOperation> disposeArguments, bool isAsynchronous) 4147ImmutableArray<IArgumentOperation> args; 4156args = ImmutableArray<IArgumentOperation>.Empty; 4262ImmutableArray.Create<IArgumentOperation>( 4290ImmutableArray.Create<IArgumentOperation>( 4345ImmutableArray.Create<IArgumentOperation>( 4598InvocationOperation makeInvocationDroppingInstanceForStaticMethods(IMethodSymbol method, IOperation instance, ImmutableArray<IArgumentOperation> arguments) 4603InvocationOperation makeInvocation(SyntaxNode syntax, IMethodSymbol method, IOperation? instanceOpt, ImmutableArray<IArgumentOperation> arguments) 4613ImmutableArray<IArgumentOperation> makeArguments(ImmutableArray<IArgumentOperation> arguments, ref IOperation? instance) 4628return ImmutableArray<IArgumentOperation>.Empty; 4709var builder = ArrayBuilder<IArgumentOperation>.GetInstance(parametersCount, fillWithValue: null!); 5834(IOperation? visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments) = VisitInstanceWithArguments(instance, operation.Arguments); 5849(IOperation visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments) handlePointerAndArguments( 5850IOperation targetPointer, ImmutableArray<IArgumentOperation> arguments) 5854ImmutableArray<IArgumentOperation> visitedArguments = VisitArguments(arguments, instancePushed: false); 5861private (IOperation? visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments) VisitInstanceWithArguments(IOperation? instance, ImmutableArray<IArgumentOperation> arguments) 5869ImmutableArray<IArgumentOperation> visitedArguments = VisitArguments(arguments, instancePushed: hasInstance); 5887ImmutableArray<IArgumentOperation> visitedArgs = VisitArguments(operation.Arguments, instancePushed: false); 6130ImmutableArray<IArgumentOperation> propertyArguments = PopArray(propertyReference.Arguments, RewriteArgumentFromArray); 6201IOperation visitedTarget = new PropertyReferenceOperation(propertyReference.Property, propertyReference.ConstrainedToType, ImmutableArray<IArgumentOperation>.Empty, visitedPropertyInstance, 6576IArgumentOperation? outParameterArgument = null; 6923(IOperation? visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments) = VisitInstanceWithArguments(instance, operation.Arguments); 7005ImmutableArray<IArgumentOperation> arguments; 7009var builder = ArrayBuilder<IArgumentOperation>.GetInstance(propertySymbol.Parameters.Length); 7025arguments = ImmutableArray<IArgumentOperation>.Empty; 7113(IOperation? visitedInstance, ImmutableArray<IArgumentOperation> visitedArguments) = 7531matchFailureCtor, initializer: null, ImmutableArray<IArgumentOperation>.Empty, semanticModel: null, operation.Syntax, 7639public override IOperation VisitArgument(IArgumentOperation operation, int? captureIdForResult) 7669isVirtual: true, arguments: ImmutableArray<IArgumentOperation>.Empty, 7771var visitedValue = new PropertyReferenceOperation(property, constrainedToType: null, ImmutableArray<IArgumentOperation>.Empty, oldInstance, 7797var 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)
35public readonly ImmutableArray<IArgumentOperation> GetEnumeratorArguments; 36public readonly ImmutableArray<IArgumentOperation> MoveNextArguments; 37public readonly ImmutableArray<IArgumentOperation> CurrentArguments; 38public readonly ImmutableArray<IArgumentOperation> DisposeArguments; 51ImmutableArray<IArgumentOperation> getEnumeratorArguments = default, 52ImmutableArray<IArgumentOperation> moveNextArguments = default, 53ImmutableArray<IArgumentOperation> currentArguments = default, 54ImmutableArray<IArgumentOperation> disposeArguments = default)
Microsoft.CodeAnalysis.CodeStyle (4)
AbstractSimplifyInterpolationHelpers.cs (2)
162return Unwrap(interpolatedStringOperation?.Parent, towardsParent: true) is IArgumentOperation 247private static bool IsSpaceChar(IArgumentOperation argument)
OperationExtensions.cs (1)
153else if (operation.Parent is IArgumentOperation argumentOperation)
SymbolUsageAnalysis.Walker.cs (1)
331public override void VisitArgument(IArgumentOperation operation)
Microsoft.CodeAnalysis.CSharp (24)
Lowering\LocalRewriter\LocalRewriter_Call.cs (6)
946internal static ImmutableArray<IArgumentOperation> MakeArgumentsInEvaluationOrder( 969ArrayBuilder<IArgumentOperation> argumentsBuilder = ArrayBuilder<IArgumentOperation>.GetInstance(arguments.Length); 1141private static ImmutableArray<IArgumentOperation> BuildArgumentsInEvaluationOrder( 1153ArrayBuilder<IArgumentOperation> argumentsInEvaluationBuilder = ArrayBuilder<IArgumentOperation>.GetInstance(parameters.Length);
Operations\CSharpOperationFactory.cs (12)
454ImmutableArray<IArgumentOperation> arguments = DeriveArguments(boundCall); 612var arguments = ImmutableArray<IArgumentOperation>.Empty; 634ImmutableArray<IArgumentOperation> arguments = DeriveArguments(boundIndexerAccess); 727ImmutableArray<IArgumentOperation> arguments = DeriveArguments(boundObjectCreationExpression); 875ImmutableArray<IArgumentOperation> arguments; 891arguments = ImmutableArray<IArgumentOperation>.Empty; 921ImmutableArray<IArgumentOperation> arguments = DeriveArguments(boundCollectionElementInitializer); 1822ImmutableArray<IArgumentOperation> CreateArgumentOperations(MethodArgumentInfo? info, 1831return ImmutableArray<IArgumentOperation>.Empty; 2762reference = new PropertyReferenceOperation(property.GetPublicSymbol(), constrainedToType: null, ImmutableArray<IArgumentOperation>.Empty, 2795private ImmutableArray<IArgumentOperation> CreateDisposeArguments(MethodArgumentInfo patternDisposeInfo, SyntaxNode syntax) 2802return ImmutableArray<IArgumentOperation>.Empty;
Operations\CSharpOperationFactory_Methods.cs (6)
36internal IArgumentOperation CreateArgumentOperation(ArgumentKind kind, IParameterSymbol? parameter, BoundExpression expression) 194internal ImmutableArray<IArgumentOperation> DeriveArguments(BoundNode containingExpression) 278private ImmutableArray<IArgumentOperation> DeriveArguments( 292return ImmutableArray<IArgumentOperation>.Empty; 363arguments: ImmutableArray<IArgumentOperation>.Empty, 375ImmutableArray<IArgumentOperation>.Empty,
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
CastSimplifier.cs (1)
1286var argument = invocationOperation.Arguments.FirstOrDefault(a => Equals(originalParameter, a.Parameter));
CSharpSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
22=> invocation.Parent is IArgumentOperation argument &&
CSharpUseImplicitTypeHelper.cs (1)
250var argumentOp = invocationOp.Arguments.FirstOrDefault(a => a.Syntax == argument);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
ConvertToRecordHelpers.cs (5)
46Arguments: [IArgumentOperation { Value: IOperation arg }] 297IInvocationOperation { Arguments: ImmutableArray<IArgumentOperation> args }) 301foreach (var arg in args) 371Arguments: ImmutableArray<IArgumentOperation> { IsEmpty: true }, 631Arguments: [IArgumentOperation { Value: IOperation arg }]
Microsoft.CodeAnalysis.CSharp.Features (6)
ConvertToRecordHelpers.cs (5)
46Arguments: [IArgumentOperation { Value: IOperation arg }] 297IInvocationOperation { Arguments: ImmutableArray<IArgumentOperation> args }) 301foreach (var arg in args) 371Arguments: ImmutableArray<IArgumentOperation> { IsEmpty: true }, 631Arguments: [IArgumentOperation { Value: IOperation arg }]
CSharpSimplifyLinqExpressionDiagnosticAnalyzer.cs (1)
22=> invocation.Parent is IArgumentOperation argument &&
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests_IArgument.cs (2)
3063var argument = invocation.Arguments[0]; 4145foreach (var argument in operation.Arguments)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
CastSimplifier.cs (1)
1286var argument = invocationOperation.Arguments.FirstOrDefault(a => Equals(originalParameter, a.Parameter));
CSharpUseImplicitTypeHelper.cs (1)
250var argumentOp = invocationOp.Arguments.FirstOrDefault(a => a.Syntax == argument);
Microsoft.CodeAnalysis.Features (12)
AbstractSimplifyInterpolationHelpers.cs (2)
162return Unwrap(interpolatedStringOperation?.Parent, towardsParent: true) is IArgumentOperation 247private static bool IsSpaceChar(IArgumentOperation argument)
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (5)
438private static async Task<ImmutableArray<IArgumentOperation>> GetArgumentsReadOnlyOnceAsync( 440ImmutableArray<IArgumentOperation> arguments, 444using var _ = ArrayBuilder<IArgumentOperation>.GetInstance(out var builder); 445foreach (var argument in arguments) 505IArgumentOperation argumentOperation)
ValueTracking\ValueTracker.OperationCollector.cs (5)
36IArgumentOperation argumentOperation => ShouldTrackArgument(argumentOperation) ? VisitAsync(argumentOperation.Value, cancellationToken) : Task.CompletedTask, 123if (IsContainedIn<IArgumentOperation>(operation, out var argumentOperation) && argumentOperation.Parameter is not null) 186private async Task TrackArgumentsAsync(ImmutableArray<IArgumentOperation> argumentOperations, CancellationToken cancellationToken) 233private static bool ShouldTrackArgument(IArgumentOperation argumentOperation)
Microsoft.CodeAnalysis.Test.Utilities (18)
Compilation\ControlFlowGraphVerifier.cs (1)
939while (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 (5)
345void visitArguments(ImmutableArray<IArgumentOperation> arguments) 349foreach (IArgumentOperation arg in arguments) 472foreach (var arg in disposeArgs) 564public override void VisitArgument(IArgumentOperation operation) 1791foreach (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 (23)
Operations\VisualBasicOperationFactory.vb (5)
449Dim arguments As ImmutableArray(Of IArgumentOperation) = DeriveArguments(boundCall) 822Dim arguments as ImmutableArray(Of IArgumentOperation) = DeriveArguments(boundObjectCreationExpression) 884Dim arguments as ImmutableArray(Of IArgumentOperation) = DeriveArguments(boundPropertyAccess) 1606Dim arguments = ImmutableArray(Of IArgumentOperation).Empty 1665arguments:=ImmutableArray(Of IArgumentOperation).Empty,
Operations\VisualBasicOperationFactory_Methods.vb (10)
169Friend Function DeriveArguments(boundNode As BoundNode) As ImmutableArray(Of IArgumentOperation) 177Return ImmutableArray(Of IArgumentOperation).Empty 179Return If(boundCreation.ConstructorOpt Is Nothing, ImmutableArray(Of IArgumentOperation).Empty, DeriveArguments(boundCreation.Arguments, boundCreation.ConstructorOpt.Parameters, boundCreation.DefaultArguments)) 182Return If(boundProperty.Arguments.Length = 0, ImmutableArray(Of IArgumentOperation).Empty, DeriveArguments(boundProperty.Arguments, boundProperty.PropertySymbol.Parameters, boundProperty.DefaultArguments)) 194Friend Function DeriveArguments(boundArguments As ImmutableArray(Of BoundExpression), parameters As ImmutableArray(Of VisualBasic.Symbols.ParameterSymbol), ByRef defaultArguments As BitVector) As ImmutableArray(Of IArgumentOperation) 198Dim arguments As ArrayBuilder(Of IArgumentOperation) = ArrayBuilder(Of IArgumentOperation).GetInstance(argumentsLength) 211) As IArgumentOperation 253isImplicit As Boolean) As IArgumentOperation 333ImmutableArray(Of IArgumentOperation).Empty,
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)
OperationExtensions.cs (1)
153else if (operation.Parent is IArgumentOperation argumentOperation)
SymbolUsageAnalysis.Walker.cs (1)
331public override void VisitArgument(IArgumentOperation operation)