Class ComponentInfoSessionManager
Last update: 19.06.2026Namespace: Phoenix.BuilderUIClient
Assembly: Phoenix.BuilderUIClient.dll
Manager for the loading and switching between sessions in a ComponentInfoControl. Provides methods to prompt the user for applying changes, and ensures proper cleanup and reuse of active edit sessions.
public class ComponentInfoSessionManager : AbstractDisposableAsync, IDisposableAndAsync, IDisposable
Inheritance
object ← AbstractDisposable ← AbstractDisposableAsync ← ComponentInfoSessionManager
Implements
IDisposableAndAsync, IDisposable
Inherited Members
AbstractDisposableAsync.Dispose(bool), AbstractDisposableAsync.DisposeAsync(), AbstractDisposableAsync.DisposeAsync(bool), AbstractDisposable.disposed, AbstractDisposable.Dispose(), AbstractDisposable.IsDisposed, AbstractDisposable.Dispose(bool), object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()
Constructors
Constructor.
Fields
Event handler in the class that creates this session manager to use to subscribe to the
Phoenix.ComponentAPI.IHarnessBuilderUISession.TestRunRequested event for builder UIs. Can be null if
no event handler is needed.
Properties
Event handler in the class that creates this session manager to use to subscribe to the
Phoenix.ComponentAPI.IHarnessBuilderUISession.ComponentChanged event for builder UIs. This event is fired
when the open component is saved from the builder UI or from the Edit Component UI.
Can be null if no event handler is needed.
Methods
Derived classes must implement this method to do their dispose work.
OpenBuilderUIForComponent(IHarnessRunnerSession)
Loads a component into the control, and opens a builder UI session for it. TrySavingExistingSessionAsync(IHarnessRunnerSession) should be called before this to ensure changes are applied and the user is given a chance to cancel.
OpenComponent(IHarnessRunnerSession)
Loads a component into the control. If there is any local edit session open for it, it is closed. Builder sessions are not changed, and should remain open. TrySavingExistingSessionAsync(IHarnessRunnerSession) should be called before this to ensure changes are applied and the user is given a chance to cancel.
OpenComponentWithLocalEditSession(IHarnessRunnerSession)
Loads a component into the control, and opens a local edit session for it. TrySavingExistingSessionAsync(IHarnessRunnerSession) should be called before this to ensure changes are applied and the user is given a chance to cancel.
OpenExistingBuilderUI(IHarnessBuilderUISession)
Loads a component into the control that already has an existing builder UI session. The builder session will now be managed by this object. TrySavingExistingSessionAsync(IHarnessRunnerSession) should be called before this to ensure changes are applied and the user is given a chance to cancel.
TrySavingExistingSessionAsync(FutureOperation, IHarnessRunnerSession, bool, bool)
Checks the current builder or writer session for changes, prompts the user if they want to save and continue,
and if so, saves and closes that session. Call this before calls to
Phoenix.BuilderUIClient.ComponentInfoSessionManager.OpenComponentWithLocalEditSession(Phoenix.ComponentAPI.IHarnessRunnerSession), see Phoenix.BuilderUIClient.ComponentInfoSessionManager.OpenBuilderUIForComponent(Phoenix.ComponentAPI.IHarnessRunnerSession),
Phoenix.BuilderUIClient.ComponentInfoSessionManager.OpenExistingBuilderUI(Phoenix.ComponentAPI.IHarnessBuilderUISession), and Phoenix.BuilderUIClient.ComponentInfoSessionManager.UnloadComponent.
Does nothing if it is determined the current sessions can be reused via the provided arguments.
Unload the current component.
Show a dialog asking the user if they want to save the current changes or cancel the future operation.
Event fired after the manager disposes of the active builder UI session.