Class ContextExtensions
public static class ContextExtensions
- Inheritance
-
ContextExtensions
- Inherited Members
Methods
Resolve<TService>(IContext)
Resolves a registered service (normally via an IoC container).
public static TService Resolve<TService>(this IContext context)
Parameters
context
IContextContext instance.
Returns
- TService
Service instance.
Type Parameters
TService
Type of service to resolve.
Update<T>(IContext, T, Action<T>)
Updates existing fact in the rules engine's memory. First the update action is applied to the fact, then the fact is updated in the engine's memory.
public static void Update<T>(this IContext context, T fact, Action<T> updateAction)
Parameters
context
IContextContext instance.
fact
TExisting fact to update.
updateAction
Action<T>Action to apply to the fact.
Type Parameters
T