Encapsulation of method arguments.
Inheritance
Namespace: PostSharp.Aspects
Assembly: PostSharp.dll
Syntax
public class Arguments : IList<object>, ICollection<object>, IEnumerable<object>, IEnumerable, ICloneable
Remarks
note
As a result of optimizations, an Arguments object may be shared between different advices. If an advice implementation needs to access an Arguments object after it has given over control, it should take a reference to a clone instead of the initial object itself.
note
Implementations of this type should be considered an implementation detail and should not be accessed by user code.
Fields
Name | Description |
---|---|
Empty | Empty list of Arguments. |
Properties
Name | Description |
---|---|
Count | Gets the number of arguments encapsulated by the current object. |
this[int] | Gets or sets the value of an argument. Setting the value is only supported in specific situations. See SetArgument(int, object) for details. |
Methods
Name | Description |
---|---|
Clone() | Returns a shallow copy of the current object. |
CopyFrom(object[], int) | Copies all the argument values from the elements of Array. |
CopyTo(object[], int) | Copies all arguments values to the specified Array starting at the specified destination Array index. |
Create(params 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(int) | Gets the value of the argument at a given index. |
GetEnumerator() | |
SetArgument(int, object) | Sets the value of the |
ToArray() | Converts the current argument list into an Array. |