Heading to the Printing United trade show? Schedule a meeting with our representatives.

Create Method

Sets up dependency injection.

Namespace: Aurigma.DesignAtoms.Configuration
Assembly: Aurigma.DesignAtoms (in Aurigma.DesignAtoms.dll)

Syntax

C#
public static IContainer Create(
	TypeRegistrationOrderedDict bindings,
	IEnumerable<Assembly> controllerAssemblies,
	TypeRegistrationOrderedDict additionalBindings
)

Parameters

bindings

Type: TypeRegistrationOrderedDict

The default value is null.
controllerAssemblies

Type: System.Collections.Generic.IEnumerable<Assembly>

Assemblies to scan for controllers. The default value is null.
additionalBindings

Type: TypeRegistrationOrderedDict

Additional parameters for dependency injection.The default value is null.

Return Value

An IContainer implementing inversion of control.

Examples

You can instantiate registered classes and interfaces by using dependency injection.
C#
using Aurigma.DesignAtoms.Configuration;
using Aurigma.DesignAtoms.Convert;
Injector.CurrentFactory = () => DefaultInjectorFactory.Create();
var parser = Injector.Instance.Resolve<TemplateParser>();

See Also

Reference

Manual