Class SidebarControllerBase<TModel, TView>
public abstract class SidebarControllerBase<TModel, TView> : ISidebarController where TModel : class, ISidebarModel where TView : Control
Type Parameters
TModelTView
- Inheritance
-
SidebarControllerBase<TModel, TView>
- Implements
- Derived
- Inherited Members
Constructors
SidebarControllerBase(IServices)
public SidebarControllerBase(IServices services)
Parameters
servicesIServices
Fields
Logger
protected readonly ILogger Logger
Field Value
Services
protected readonly IServices Services
Field Value
Properties
IsAttached
public bool IsAttached { get; }
Property Value
Model
protected TModel Model { get; }
Property Value
- TModel
Methods
Attach()
called when a sidebar should be activated, creating a user-specific model
public ISidebarModel Attach()
Returns
- ISidebarModel
the activated sidebar, or null on failure
CreateModel()
protected abstract TModel CreateModel()
Returns
- TModel
DestroyModel(TModel)
protected virtual void DestroyModel(TModel model)
Parameters
modelTModel
Detach()
called when a sidebar should be deactivated, disposing the now-unused model
public ISidebarModel? Detach()
Returns
- ISidebarModel
the activated sidebar, or null on failure
Events
Added
public event Action? Added
Event Type
Removed
public event Action? Removed