MentorAgent Docs
Menu

Questa pagina non è ancora tradotta in italiano: qui la trovi in inglese.

ReferencePackage: Novior.MentorAgent.Server

HubPageContextStore class

The HubPageContextStore class of Novior.MentorAgent.Server.Hubs: Singleton store that persists the last PageContextSnapshot per SignalR connection ID across…

On this page

Singleton store that persists the last PageContextSnapshot per SignalR connection ID across DI scope boundaries. SignalR creates a new DI scope for every hub method invocation, so the Scoped IMentorPageContext resolved in UpdatePageContext is a different instance from the one resolved in SendMessage. This store bridges the gap: UpdatePageContext writes here; SendMessage reads and applies before the orchestrator runs.

Namespace: Novior.MentorAgent.Server.Hubs. Package: Novior.MentorAgent.Server.

public sealed class HubPageContextStore

Terminal
dotnet add package Novior.MentorAgent.Server

public HubPageContextStore()

public PageContextSnapshot? Get(string connectionId)

public void Remove(string connectionId)

public void Store(string connectionId, PageContextSnapshot snapshot)