Autofac .NET Inversion of Control Container
PositionalParameter Class
NamespacesAutofacPositionalParameter
A parameter that is identified according to an integer representing its position in an argument list. When applied to a reflection-based component, Position will be matched against the indices of the component's constructor arguments. When applied to a delegate-based component, the parameter can be accessed using Positional<(Of <(T>)>)(IEnumerable<(Of <(Parameter>)>), Int32).
Declaration Syntax
C#Visual BasicVisual C++
public class PositionalParameter : ConstantParameter
Public Class PositionalParameter _
	Inherits ConstantParameter
public ref class PositionalParameter : public ConstantParameter
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
PositionalParameter(Int32, Object)
Construct a positional parameter with the specified constant value.

CanSupplyValue(ParameterInfo, IComponentContext, Func<(Of <(Object>)>)%)
Returns true if the parameter is able to provide a value to a particular site.
(Inherited from ConstantParameter.)
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetHashCode()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()
Gets the Type of the current instance.
(Inherited from Object.)
MemberwiseClone()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Position
The zero-based position of the parameter.

ToString()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Value
The value of the parameter.
(Inherited from ConstantParameter.)
Examples
Component with parameter:
CopyC#
public class MyComponent
{
    public MyComponent(int amount) { ... }
}
Providing the parameter:
CopyC#
var builder = new ContainerBuilder();
builder.RegisterType<MyComponent>();
var container = builder.Build();
var myComponent = container.Resolve<MyComponent>(new PositionalParameter(0, 123));
Inheritance Hierarchy
Object
Parameter
 ConstantParameter
  PositionalParameter

Assembly: Autofac (Module: Autofac) Version: 2.1.13.813 (2.1.13.813)