Documentation
Table of Contents

Method When

Namespace
IntentSharp.Specialist
Assembly
IntentSharp.Specialist.dll

When(Func<KeepPreviousContext, bool>)

Keeps the previous specialist serving when predicate returns true for the change, for example only when the new definition belongs to the same family as the previous one. It is called on the caller's thread, once for each change a call finds, before anything is requested. An exception it throws reaches the caller.

public static KeepPreviousPolicy When(Func<KeepPreviousContext, bool> predicate)

Parameters

predicate Func<KeepPreviousContext, bool>

Receives the previous and the new request and where the intent stands.

Returns

KeepPreviousPolicy

Exceptions

ArgumentNullException

predicate is null.