Tracks migrating the PubSub external-server adapter (Opc.Ua.PubSub.Adapter) to use the ISession abstraction instead of the concrete Opc.Ua.Client.ManagedSession wherever possible, and removing the remaining downcasts.
Per PR #3892 review feedback, ServerSession (and related adapter session usage) was changed to hold and pass ISession. Service calls (ReadAsync/WriteAsync/CallAsync/TranslateBrowsePathsToNodeIdsAsync/DisposeAsync) already work through ISession.
The following members are currently not on ISession and still require a downcast to ManagedSession (places to address by promoting the API onto ISession/ISessionClient):
ManagedSession.SubscriptionManager (Subscriptions.ISubscriptionManager) — used by ServerSession.CreateDataChangeSubscriptionAsync and ServerSession.StartModelChangeMonitoringAsync.
ManagedSession.MessageContext (IServiceMessageContext) — used by ServerSession.ResolveBrowsePathAsync (session.MessageContext.NamespaceUris).
Proposed resolution: expose SubscriptionManager and MessageContext (or equivalents) on ISession, then drop the (ManagedSession) casts in ServerSession.
Raised from PR #3892 review feedback.
Tracks migrating the PubSub external-server adapter (
Opc.Ua.PubSub.Adapter) to use theISessionabstraction instead of the concreteOpc.Ua.Client.ManagedSessionwherever possible, and removing the remaining downcasts.Per PR #3892 review feedback,
ServerSession(and related adapter session usage) was changed to hold and passISession. Service calls (ReadAsync/WriteAsync/CallAsync/TranslateBrowsePathsToNodeIdsAsync/DisposeAsync) already work throughISession.The following members are currently not on
ISessionand still require a downcast toManagedSession(places to address by promoting the API ontoISession/ISessionClient):ManagedSession.SubscriptionManager(Subscriptions.ISubscriptionManager) — used byServerSession.CreateDataChangeSubscriptionAsyncandServerSession.StartModelChangeMonitoringAsync.ManagedSession.MessageContext(IServiceMessageContext) — used byServerSession.ResolveBrowsePathAsync(session.MessageContext.NamespaceUris).Proposed resolution: expose
SubscriptionManagerandMessageContext(or equivalents) onISession, then drop the(ManagedSession)casts inServerSession.Raised from PR #3892 review feedback.