Table of Contents

Class AutofacRuleActivator

Namespace
NRules.Integration.Autofac
Assembly
NRules.Integration.Autofac.dll

Rule activator that uses Autofac DI container.

public class AutofacRuleActivator : IRuleActivator
Inheritance
AutofacRuleActivator
Implements
Inherited Members

Constructors

AutofacRuleActivator(ILifetimeScope)

public AutofacRuleActivator(ILifetimeScope container)

Parameters

container ILifetimeScope

Methods

Activate(Type)

Creates rule's instances from a CLR type.

public IEnumerable<Rule> Activate(Type type)

Parameters

type Type

Rule CLR type.

Returns

IEnumerable<Rule>

Rule instances.

Remarks

The same rule type may be instantiated multiple times with different parameters. Each instance is considered a separate rule, and should have a unique name.