Class ScreenService
public sealed class ScreenService
- Inheritance
-
ScreenService
- Inherited Members
Constructors
ScreenService(IServices, IControllerFactory, VirtualisationOptions, TimeSpan?, TimeSpan?, ScreenConfiguration)
public ScreenService(IServices services, IControllerFactory controllerFactory, VirtualisationOptions virtualisationOptions, TimeSpan? searchDelay, TimeSpan? saveNotificationTimeout, ScreenConfiguration screenConfiguration)
Parameters
servicesIServicescontrollerFactoryIControllerFactoryvirtualisationOptionsVirtualisationOptionssearchDelayTimeSpan?saveNotificationTimeoutTimeSpan?screenConfigurationScreenConfiguration
Fields
SearchDelay
public readonly TimeSpan? SearchDelay
Field Value
Methods
CreateContentController<T>(T, Action<ContentOptions>?)
Views or edits the properties of a single T
public ContentControllerBase<T> CreateContentController<T>(T e, Action<ContentOptions>? configure = null) where T : IEntity<T>
Parameters
eTThe entity to edit.
configureAction<ContentOptions>Optional. An action to run to modify screen behaviour.
Returns
Type Parameters
T
CreateCreateController<T>(Action<CreateOptions>?)
Creates and saves a T
public CreateController<T> CreateCreateController<T>(Action<CreateOptions>? configure = null) where T : IEntity<T>
Parameters
configureAction<CreateOptions>Optional. An action to run to modify screen behaviour.
Returns
Type Parameters
T
CreateCreateController<T>(Action<T>, Action<CreateOptions>?)
Creates and saves a T
public CreateController<T> CreateCreateController<T>(Action<T> init, Action<CreateOptions>? configure = null) where T : IEntity<T>
Parameters
initAction<T>An action to run on the entity after creating it. If this fails, the screen still loads.
configureAction<CreateOptions>Optional. An action to run to modify screen behaviour.
Returns
Type Parameters
T
CreateCreateController<T>(Func<IPrincipal, Task<T>>, Action<CreateOptions>?)
Creates and saves a T
public CreateController<T> CreateCreateController<T>(Func<IPrincipal, Task<T>> entityFactory, Action<CreateOptions>? configure = null) where T : IEntity<T>
Parameters
entityFactoryFunc<IPrincipal, Task<T>>An action to run to create the entity.
configureAction<CreateOptions>Optional. An action to run to modify screen behaviour.
Returns
Type Parameters
T
CreateCreateController<T>(Func<IPrincipal, Task<T>>, Action<T>, Action<CreateOptions>?)
Creates and saves a T
public CreateController<T> CreateCreateController<T>(Func<IPrincipal, Task<T>> entityFactory, Action<T> init, Action<CreateOptions>? configure = null) where T : IEntity<T>
Parameters
entityFactoryFunc<IPrincipal, Task<T>>An action to run to create the entity.
initAction<T>An action to run on the entity after creating it. If this fails, the screen still loads.
configureAction<CreateOptions>Optional. An action to run to modify screen behaviour.
Returns
Type Parameters
T
CreateCreateController<T>(Func<IPrincipal, Task<T>>, Func<T, Task>, Action<CreateOptions>?)
Creates and saves a T
public CreateController<T> CreateCreateController<T>(Func<IPrincipal, Task<T>> entityFactory, Func<T, Task> init, Action<CreateOptions>? configure = null) where T : IEntity<T>
Parameters
entityFactoryFunc<IPrincipal, Task<T>>An action to run to create the entity.
initFunc<T, Task>An action to run on the entity after creating it. If this fails, the screen still loads.
configureAction<CreateOptions>Optional. An action to run to modify screen behaviour.
Returns
Type Parameters
T
CreateCreateController<T>(Func<IPrincipal, T>, Action<CreateOptions>?)
Creates and saves a T
public CreateController<T> CreateCreateController<T>(Func<IPrincipal, T> entityFactory, Action<CreateOptions>? configure = null) where T : IEntity<T>
Parameters
entityFactoryFunc<IPrincipal, T>An action to run to create the entity.
configureAction<CreateOptions>Optional. An action to run to modify screen behaviour.
Returns
Type Parameters
T
CreateCreateController<T>(Func<IPrincipal, T>, Action<T>, Action<CreateOptions>?)
Creates and saves a T
public CreateController<T> CreateCreateController<T>(Func<IPrincipal, T> entityFactory, Action<T> init, Action<CreateOptions>? configure = null) where T : IEntity<T>
Parameters
entityFactoryFunc<IPrincipal, T>An action to run to create the entity.
initAction<T>An action to run on the entity after creating it. If this fails, the screen still loads.
configureAction<CreateOptions>Optional. An action to run to modify screen behaviour.
Returns
Type Parameters
T
CreateCreateController<T>(Func<IPrincipal, T>, Func<T, Task>, Action<CreateOptions>?)
Creates and saves a T
public CreateController<T> CreateCreateController<T>(Func<IPrincipal, T> entityFactory, Func<T, Task> init, Action<CreateOptions>? configure = null) where T : IEntity<T>
Parameters
entityFactoryFunc<IPrincipal, T>An action to run to create the entity.
initFunc<T, Task>An action to run on the entity after creating it. If this fails, the screen still loads.
configureAction<CreateOptions>Optional. An action to run to modify screen behaviour.
Returns
Type Parameters
T
CreateCreateController<T>(Func<T, Task>, Action<CreateOptions>?)
Creates and saves a T
public CreateController<T> CreateCreateController<T>(Func<T, Task> init, Action<CreateOptions>? configure = null) where T : IEntity<T>
Parameters
initFunc<T, Task>An action to run on the entity after creating it. If this fails, the screen still loads.
configureAction<CreateOptions>Optional. An action to run to modify screen behaviour.
Returns
Type Parameters
T
CreateCreateController<T>(T, Action<CreateOptions>?)
Creates and saves a T
public CreateController<T> CreateCreateController<T>(T e, Action<CreateOptions>? configure = null) where T : IEntity<T>
Parameters
eTA prebuilt entity.
configureAction<CreateOptions>Optional. An action to run to modify screen behaviour.
Returns
Type Parameters
T
CreateCreateModalController<T>()
Creates and returns a T
public IModalController<T> CreateCreateModalController<T>() where T : IEntity<T>
Returns
Type Parameters
T
CreateCreateModalController<T>(Action<T>)
Creates and returns a T
public IModalController<T> CreateCreateModalController<T>(Action<T> init) where T : IEntity<T>
Parameters
initAction<T>An action to run on the entity before exposing it to the user.
Returns
Type Parameters
T
CreateCreateModalController<T>(Func<IPrincipal, Task<T>>)
Creates and returns a T
public IModalController<T> CreateCreateModalController<T>(Func<IPrincipal, Task<T>> entityFactory) where T : IEntity<T>
Parameters
entityFactoryFunc<IPrincipal, Task<T>>An action to create the entity before exposing it to the user.
Returns
Type Parameters
T
CreateCreateModalController<T>(Func<IPrincipal, T>)
Creates and returns a T
public IModalController<T> CreateCreateModalController<T>(Func<IPrincipal, T> entityFactory) where T : IEntity<T>
Parameters
entityFactoryFunc<IPrincipal, T>An action to create the entity before exposing it to the user.
Returns
Type Parameters
T
CreateCreateModalController<T>(Func<T, Task>)
public IModalController<T> CreateCreateModalController<T>(Func<T, Task> init) where T : IEntity<T>
Parameters
Returns
Type Parameters
T
CreateCreateModalController<T>(T)
Creates and returns a T
public IModalController<T> CreateCreateModalController<T>(T e) where T : IEntity<T>
Parameters
eTA prebuilt entity.
Returns
Type Parameters
T
CreateCriteriaController<T>(Action<CriteriaOptions>?)
Creates a search specification for a T
public CriteriaController<T> CreateCriteriaController<T>(Action<CriteriaOptions>? configure = null) where T : IEntity<T>
Parameters
configureAction<CriteriaOptions>
Returns
Type Parameters
T
Remarks
Right now generated code makes the query factory for this overload, but we could do it here with only slight overhead.
CreateCriteriaController<T>(Func<IEntityContext, IEntityQuery<T>>, Action<CriteriaOptions>?)
Creates a search specification for a T
public CriteriaController<T> CreateCriteriaController<T>(Func<IEntityContext, IEntityQuery<T>> queryFactory, Action<CriteriaOptions>? configure = null) where T : IEntity<T>
Parameters
queryFactoryFunc<IEntityContext, IEntityQuery<T>>configureAction<CriteriaOptions>
Returns
Type Parameters
T
CreateCriteriaController<T>(Func<IEntityContext, IQueryable<T>>, Action<CriteriaOptions>?)
Creates a search specification for a T
public CriteriaController<T> CreateCriteriaController<T>(Func<IEntityContext, IQueryable<T>> queryFactory, Action<CriteriaOptions>? configure = null) where T : IEntity<T>
Parameters
queryFactoryFunc<IEntityContext, IQueryable<T>>configureAction<CriteriaOptions>
Returns
Type Parameters
T
CreateDisplayController<T>(Guid, Action<DisplayOptions>?)
Loads a T from the datastore, allowing the user to view or edit it
public DisplayController<T> CreateDisplayController<T>(Guid id, Action<DisplayOptions>? configure = null) where T : IEntity<T>
Parameters
idGuidThe ID of the entity to load
configureAction<DisplayOptions>Optional. An action to run to modify screen behaviour.
Returns
Type Parameters
T
CreateDisplayModalController<T>(bool, T)
Views or edits a T in memory
public IModalController<T> CreateDisplayModalController<T>(bool isEditable, T clonee) where T : IEntity<T>
Parameters
isEditableboolcloneeT
Returns
Type Parameters
T
CreateGridController<T>(IEntitySet<T>, Action<GridOptions>?)
Edits multiple Ts
public GridController<T> CreateGridController<T>(IEntitySet<T> es, Action<GridOptions>? configure = null) where T : IEntity<T>
Parameters
esIEntitySet<T>configureAction<GridOptions>
Returns
Type Parameters
T
CreateListController<T>(IEntityQuery<T>, Action<ListOptions>?)
Views multiple Ts
public ListController<T> CreateListController<T>(IEntityQuery<T> query, Action<ListOptions>? configure = null) where T : IEntity<T>
Parameters
queryIEntityQuery<T>configureAction<ListOptions>
Returns
Type Parameters
T
CreateListController<T>(IEntityQuery<T>, int, Action<ListOptions>?)
Views multiple Ts with known count
public ListController<T> CreateListController<T>(IEntityQuery<T> query, int count, Action<ListOptions>? configure = null) where T : IEntity<T>
Parameters
queryIEntityQuery<T>countintconfigureAction<ListOptions>
Returns
Type Parameters
T
CreateListController<T>(IEntitySet<T>, Action<ListOptions>?)
Views multiple Ts from an entity set
public ListController<T> CreateListController<T>(IEntitySet<T> entitySet, Action<ListOptions>? configure = null) where T : IEntity<T>
Parameters
entitySetIEntitySet<T>configureAction<ListOptions>
Returns
Type Parameters
T
CreateListController<T>(IFrozenQuery<T>, Action<ListOptions>?)
Views multiple Ts from a frozen query
public ListController<T> CreateListController<T>(IFrozenQuery<T> frozenQuery, Action<ListOptions>? configure = null) where T : IEntity<T>
Parameters
frozenQueryIFrozenQuery<T>configureAction<ListOptions>
Returns
Type Parameters
T
CreateSearchController<T>(Action<SearchOptions>?)
Searches for sets of T based on live criteria
public SearchController<T> CreateSearchController<T>(Action<SearchOptions>? configure = null) where T : IEntity<T>
Parameters
configureAction<SearchOptions>
Returns
Type Parameters
T
CreateSearchController<T>(Func<IEntityContext, IEntityQuery<T>>, Action<SearchOptions>?)
Searches for sets of T based on live criteria
public SearchController<T> CreateSearchController<T>(Func<IEntityContext, IEntityQuery<T>> queryFactory, Action<SearchOptions>? configure = null) where T : IEntity<T>
Parameters
queryFactoryFunc<IEntityContext, IEntityQuery<T>>configureAction<SearchOptions>
Returns
Type Parameters
T
CreateSearchController<T>(Func<IEntityContext, IQueryable<T>>, Action<SearchOptions>?)
Searches for sets of T based on live criteria
public SearchController<T> CreateSearchController<T>(Func<IEntityContext, IQueryable<T>> queryFactory, Action<SearchOptions>? configure = null) where T : IEntity<T>
Parameters
queryFactoryFunc<IEntityContext, IQueryable<T>>configureAction<SearchOptions>
Returns
Type Parameters
T
CreateSearchModalController<T>(Action<SearchOptions>?)
Selects a T based on search criteria
public IModalController<T> CreateSearchModalController<T>(Action<SearchOptions>? configure = null) where T : IEntity<T>
Parameters
configureAction<SearchOptions>
Returns
Type Parameters
T
CreateSearchModalController<T>(Func<IEntityContext, IEntityQuery<T>>, Action<SearchOptions>?)
Selects a T based on search criteria
public IModalController<T> CreateSearchModalController<T>(Func<IEntityContext, IEntityQuery<T>> queryFactory, Action<SearchOptions>? configure = null) where T : IEntity<T>
Parameters
queryFactoryFunc<IEntityContext, IEntityQuery<T>>configureAction<SearchOptions>
Returns
Type Parameters
T
CreateSearchModalController<T>(Func<IEntityContext, IQueryable<T>>, Action<SearchOptions>?)
Selects a T based on search criteria
public IModalController<T> CreateSearchModalController<T>(Func<IEntityContext, IQueryable<T>> queryFactory, Action<SearchOptions>? configure = null) where T : IEntity<T>
Parameters
queryFactoryFunc<IEntityContext, IQueryable<T>>configureAction<SearchOptions>
Returns
Type Parameters
T
GetDisplayContext(ISurface)
If the screen is being used to display a property, returns the metadata for that property; otherwise returns null.
public PropertyInfo? GetDisplayContext(ISurface surface)
Parameters
surfaceISurface
Returns
NotifyEntitiesSaved(IEnumerable<EntityKernel>, EntityKernel?)
public void NotifyEntitiesSaved(IEnumerable<EntityKernel> entities, EntityKernel? topLevelEntity = null)
Parameters
entitiesIEnumerable<EntityKernel>topLevelEntityEntityKernel
NotifyEntitiesSaved(IEnumerable<IEntity>, IEntity?)
public void NotifyEntitiesSaved(IEnumerable<IEntity> entities, IEntity? topLevelEntity = null)
Parameters
entitiesIEnumerable<IEntity>topLevelEntityIEntity
NotifyEntitiesSaved(ILookup<IEntityInfo, (Guid ID, string Text, bool IsDeleted, bool IsTopLevel)>)
public void NotifyEntitiesSaved(ILookup<IEntityInfo, (Guid ID, string Text, bool IsDeleted, bool IsTopLevel)> entitiesByMetadata)
Parameters
entitiesByMetadataILookup<IEntityInfo, (Guid ID, string Text, bool IsDeleted, bool IsTopLevel)>
NotifyEntityOpened(IEntityInfo, Guid, string)
public void NotifyEntityOpened(IEntityInfo type, Guid id, string text)
Parameters
typeIEntityInfoidGuidtextstring
WithDisplayContextAsync<T>(ISurface, PropertyInfo, Func<Task<T>>)
public Task<T> WithDisplayContextAsync<T>(ISurface surface, PropertyInfo context, Func<Task<T>> f)
Parameters
surfaceISurfacecontextPropertyInfofFunc<Task<T>>
Returns
- Task<T>
Type Parameters
T
WithDisplayContext<T>(ISurface, PropertyInfo, Func<T>)
public T WithDisplayContext<T>(ISurface surface, PropertyInfo context, Func<T> f)
Parameters
surfaceISurfacecontextPropertyInfofFunc<T>
Returns
- T
Type Parameters
T
Events
EntitiesSaved
public event ScreenService.EntitiesSavedEventHandler? EntitiesSaved
Event Type
EntityOpened
public event ScreenService.EntityOpenedEventHandler? EntityOpened