Click or drag to resize

ConfigurationExtensionsGetAssembly Method

Reads an assembly name from configuration and parses the assembly name into an assembly.

Namespace:  Autofac.Configuration.Core
Assembly:  Autofac.Configuration (in Autofac.Configuration.dll) Version: 6.0.0+ec1c6438ceb3f3338c7364e35e7303f014e3fc39
Syntax
public static Assembly GetAssembly(
	this IConfiguration configuration,
	string key
)

Parameters

configuration
Type: IConfiguration
An IConfiguration from which the default assembly should be read.
key
Type: SystemString
The String key in configuration where the assembly name is specified.

Return Value

Type: Assembly
An Assembly if the assembly is specified on configuration; or if not.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IConfiguration. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullException Thrown if configuration or key is .
ArgumentException Thrown if key is empty or whitespace.
See Also