Class EntityStructureController
A standard base structure controller that uses the IEntityStructureView to visually display the structure of an IEntitySetBase and all the IAllocationPath setup within it
The view includes an instrument/path filter control to highlight paths within the structure
These are dynamically locked/visible depending on what this view is operating against. It may be working against a transaction, instrument, entity, entity set, etc.Implements
Inherited Members
Namespace: LemonEdge.Client.Core.Views.Controllers
Assembly: LemonEdge.ClientCore.dll
Syntax
public class EntityStructureController : ModelViewController, IModelViewController
Constructors
EntityStructureController(IEntityStructureView)
Creates a new EntityStructureController
Declaration
public EntityStructureController(IEntityStructureView view)
Parameters
Type | Name | Description |
---|---|---|
IEntityStructureView | view | The IEntityStructureView view implementation using the UI components of the client application. Som clients, like the console, will not implement this view as they can not visualize the structure to the user. |
Properties
AllowFilters
Declaration
public virtual bool AllowFilters { get; }
Property Value
Type | Description |
---|---|
bool |
Controls
Adds two filtering controls to the IEntityStructureView for the type of instrument or path.
These are dynamically locked/visible depending on what this view is operating against. It may be working against a transaction, instrument, entity, entity set, etc.
Declaration
public virtual IEnumerable<ControlDisplayInfo> Controls { get; }
Property Value
Type | Description |
---|---|
IEnumerable<ControlDisplayInfo> |
CurrentFilterValues
Declaration
protected EntityStructureController.FilterValues CurrentFilterValues { get; }
Property Value
Type | Description |
---|---|
EntityStructureController.FilterValues |
IgnoreEvents
Declaration
protected bool IgnoreEvents { get; set; }
Property Value
Type | Description |
---|---|
bool |
SelectedItemForSubViews
Returns the currently selected entity
Declaration
public override object SelectedItemForSubViews { get; }
Property Value
Type | Description |
---|---|
object |
Overrides
StructureView
The IEntityStructureView this controller uses
Declaration
public IEntityStructureView StructureView { get; }
Property Value
Type | Description |
---|---|
IEntityStructureView |
Methods
Clear()
Resets and clears the structure diagram view
Declaration
public override Task Clear()
Returns
Type | Description |
---|---|
Task |
Overrides
DisplayStructure(EntitySetStructure)
Declaration
protected Task DisplayStructure(EntitySetStructure structure)
Parameters
Type | Name | Description |
---|---|---|
EntitySetStructure | structure |
Returns
Type | Description |
---|---|
Task |
DisplayUI()
Determins the IEntitySetBase this structure is for and uses the EntitySetStructure helper to load the diagram information for visualizing by the IEntityStructureView
Declaration
public override Task DisplayUI()
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
Overrides
GetInstrumentFilter(IBaseEntity, IBaseEntity, IEntityRetriever)
Returns a queryable filter that ensures the instruments that this diagram can be filtered to are only those within this IEntitySet itself
Declaration
public Task<QueryableFilter> GetInstrumentFilter(IBaseEntity currentItem, IBaseEntity parentItem, IEntityRetriever context)
Parameters
Type | Name | Description |
---|---|---|
IBaseEntity | currentItem | The current item being displayed that this filter is for |
IBaseEntity | parentItem | The parent item of this entity |
IEntityRetriever | context | The context this is operating so we can include any pending changes in the filter |
Returns
Type | Description |
---|---|
Task<QueryableFilter> | A queryable filter that ensures the instruments that this diagram can be filtered to are only those within this IEntitySet itself |
GetPathFilter(IBaseEntity, IBaseEntity, IEntityRetriever)
Returns a queryable filter that ensures the paths that this diagram can be filtered to are only those within this IEntitySet itself
Declaration
public Task<QueryableFilter> GetPathFilter(IBaseEntity currentItem, IBaseEntity parentItem, IEntityRetriever context)
Parameters
Type | Name | Description |
---|---|---|
IBaseEntity | currentItem | The current item being displayed that this filter is for |
IBaseEntity | parentItem | The parent item of this entity |
IEntityRetriever | context | The context this is operating so we can include any pending changes in the filter |
Returns
Type | Description |
---|---|
Task<QueryableFilter> | A queryable filter that ensures the paths that this diagram can be filtered to are only those within this IEntitySet itself |
GetSets()
The parent IEntitySet this structure diagram is of
Declaration
public IEntitySetBase[] GetSets()
Returns
Type | Description |
---|---|
IEntitySetBase[] | The parent IEntitySet this structure diagram is of |
InitAsync()
Resets the structure diagram view and initializes the filters allowed
Declaration
public override Task InitAsync()
Returns
Type | Description |
---|---|
Task |
Overrides
InitCommands(IList<ViewCommand>)
Provides the inheriting class an opportunity to add custom commands to this controller
Declaration
protected override void InitCommands(IList<ViewCommand> commands)
Parameters
Type | Name | Description |
---|---|---|
IList<ViewCommand> | commands | The current set of commands for this controller |
Overrides
InitStructure(EntitySetStructure)
Declaration
protected virtual void InitStructure(EntitySetStructure structure)
Parameters
Type | Name | Description |
---|---|---|
EntitySetStructure | structure |
OnSelectedItemUpdated()
Indicates the views selected item has changed
Declaration
public Task OnSelectedItemUpdated()
Returns
Type | Description |
---|---|
Task |
OnValuePropertyChanged(object, PropertyChangedEventArgs)
Redisplays the structure highlighting the selected filtered path on the structure
Declaration
protected virtual void OnValuePropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
object | sender | The EntityStructureController.FilterValues that have changed |
PropertyChangedEventArgs | e | The filter value property that has changed |