PostSharpAPI ReferencePost­Sharp.​AspectsArguments
Open sandboxFocus

Arguments Class

Encapsulation of method arguments.

Implements
System.Collections.Generic.IList<Object>
System.Collections.Generic.ICollection<Object>
System.Collections.Generic.IEnumerable<Object>
IEnumerable
System.ICloneable
Namespace: PostSharp.Aspects
Assembly: PostSharp.dll
Syntax
public class Arguments : Object

Fields

Name Description
Empty

Empty list of Arguments.

Properties

Name Description
Count

Gets the number of arguments encapsulated by the current object.

Item[Int32]

Gets or sets the value of an argument. Setting the value is only supported in specific situations. See SetArgument(Int32, Object) for details.

Methods

Name Description
Clone()

Returns a shallow copy of the current object.

CopyFrom(Object[], Int32)

Copies all the argument values from the elements of Array.

CopyTo(Object[], Int32)

Copies all arguments values to the specified Array starting at the specified destination Array index.

Create(Object[])

Creates a weakly-typed Arguments object representing any number of arguments.

Create<T>(T)

Creates a strongly-typed Arguments object representing 1 argument.

Create<T0, T1>(T0, T1)

Creates a strongly-typed Arguments object representing 2 arguments.

Create<T0, T1, T2>(T0, T1, T2)

Creates a strongly-typed Arguments object representing 3 arguments.

Create<T0, T1, T2, T3>(T0, T1, T2, T3)

Creates a strongly-typed Arguments object representing 4 arguments.

Create<T0, T1, T2, T3, T4>(T0, T1, T2, T3, T4)

Creates a strongly-typed Arguments object representing 5 arguments.

Create<T0, T1, T2, T3, T4, T5>(T0, T1, T2, T3, T4, T5)

Creates a strongly-typed Arguments object representing 6 arguments.

Create<T0, T1, T2, T3, T4, T5, T6>(T0, T1, T2, T3, T4, T5, T6)

Creates a strongly-typed Arguments object representing 7 arguments.

Create<T0, T1, T2, T3, T4, T5, T6, T7>(T0, T1, T2, T3, T4, T5, T6, T7)

Creates a strongly-typed Arguments object representing 8 arguments.

GetArgument(Int32)

Gets the value of the argument at a given index.

GetEnumerator()

Returns an enumerator that iterates through the collection.

SetArgument(Int32, Object)

Sets the value of the ref or out argument at a given index. Replacing an argument value is supported only in some advices and is silently ignored in non-supported scenarios. See Remarks for details.

ToArray()

Converts the current argument list into an Array.