Method AddDayLayoutAgent
- Namespace
- MailFathom.AI
- Assembly
- MailFathom.AI.dll
AddDayLayoutAgent(IServiceCollection, bool)
Registers the one way a day is arranged, in whichever of its two states the deployment is in.
public static IServiceCollection AddDayLayoutAgent(this IServiceCollection services, bool isActivated)
Parameters
servicesIServiceCollectionThe service collection to add to.
isActivatedboolWhether the deployment declared a chat endpoint to arrange a day with.
Returns
- IServiceCollection
The same service collection, so registration reads as one expression.
Remarks
Called unconditionally and always registering something, for the reason enrichment beside it is: the port answers with a reason rather than with an absence, so the screen draws what a deployment cannot do as a sentence rather than as a control that fails.
What turns it on is the chat endpoint alone, exactly as the cleaned rendering of a body is: whether a day is ever arranged follows from somebody pressing the control, which is a person's decision rather than a key an operator writes. Which of the two is registered is decided once, at composition, so an instance that declared no model never resolves a chat client, never opens a transport, and never composes a turn.
Scoped when it is active, because a request is one scope and the agent's ledger, credential, and transport belong to that request. The inactive one is a singleton holding nothing.
Exceptions
- ArgumentNullException
Thrown when
servicesis null.