ParameterExtensions Class |
Namespace: Autofac
The ParameterExtensions type exposes the following members.
Name | Description | |
---|---|---|
NamedT |
Retrieve a named parameter value from a NamedParameter instance.
| |
PositionalT |
Retrieve a positional parameter value from a PositionalParameter instance.
| |
TypedAsT |
Retrieve a typed parameter value from a TypedParameter instance.
|
builder.Register((c, p) => new FtpClient(p.Named<string>("server")));
container.Resolve<FtpClient>(new NamedParameter("server", "ftp.example.com"));