Class ScaffoldService
public sealed class ScaffoldService
- Inheritance
-
ScaffoldService
- Inherited Members
Constructors
ScaffoldService(IEnumerable<ICommandSpec>, IEnumerable<IEditSpec>, IEnumerable<IListSpec>, IEnumerable<ICriteriaSpec>, Options)
public ScaffoldService(IEnumerable<ICommandSpec> commandOverrides, IEnumerable<IEditSpec> editOverrides, IEnumerable<IListSpec> listOverrides, IEnumerable<ICriteriaSpec> criteriaOverrides, Options options)
Parameters
commandOverridesIEnumerable<ICommandSpec>editOverridesIEnumerable<IEditSpec>listOverridesIEnumerable<IListSpec>criteriaOverridesIEnumerable<ICriteriaSpec>optionsOptions
Properties
ImageLimit
public long ImageLimit { get; }
Property Value
ProgressDelay
public TimeSpan ProgressDelay { get; }
Property Value
SearchDelay
public TimeSpan SearchDelay { get; }
Property Value
UploadLimit
public long UploadLimit { get; }
Property Value
Methods
CreateEntityAsync(IEntityInfo, IEntityContext, Guid?)
public Task<IEntity> CreateEntityAsync(IEntityInfo metadata, IEntityContext context, Guid? id = null)
Parameters
metadataIEntityInfocontextIEntityContextidGuid?
Returns
CreateEntityAsync<T>(IEntityContext, Guid?)
public Task<T> CreateEntityAsync<T>(IEntityContext context, Guid? id = null) where T : IEntity<T>
Parameters
contextIEntityContextidGuid?
Returns
- Task<T>
Type Parameters
T
ExtractColumnModels(IEntityInfo, IServices)
Extract the visible list columns for metadata as ready-to-render
ColumnModels, dropping columns the current principal cannot read and admin-only
columns for non-admins. Shared by the list views and EntitySummaryView.
public IReadOnlyList<ColumnModel> ExtractColumnModels(IEntityInfo metadata, IServices services)
Parameters
metadataIEntityInfoservicesIServices
Returns
ExtractColumns(IEntityInfo)
public IReadOnlyList<ColumnSpec> ExtractColumns(IEntityInfo metadata)
Parameters
metadataIEntityInfo
Returns
ExtractCriteria(IEntityInfo)
public IReadOnlyList<CriterionSpec> ExtractCriteria(IEntityInfo metadata)
Parameters
metadataIEntityInfo
Returns
ExtractOrdering(IEntityInfo)
public IReadOnlyList<ListOrdering> ExtractOrdering(IEntityInfo metadata)
Parameters
metadataIEntityInfo
Returns
ExtractSection(IEntityInfo, string)
public SectionSpec ExtractSection(IEntityInfo metadata, string name)
Parameters
metadataIEntityInfonamestring
Returns
ExtractSections(IEntityInfo)
public IReadOnlyList<SectionSpec> ExtractSections(IEntityInfo metadata)
Parameters
metadataIEntityInfo
Returns
GenerateCollectionCommands<T>(ICommandContext, IEntityInfo, IEntitySet<T>)
public IReadOnlyList<Command> GenerateCollectionCommands<T>(ICommandContext context, IEntityInfo metadata, IEntitySet<T> collection) where T : IEntity<T>
Parameters
contextICommandContextmetadataIEntityInfocollectionIEntitySet<T>
Returns
Type Parameters
T
GenerateCollectionEntityCommands<T>(ICommandContext, IEntityInfo, IEntitySet<T>, T)
public IReadOnlyList<Command> GenerateCollectionEntityCommands<T>(ICommandContext context, IEntityInfo metadata, IEntitySet<T> collection, T entity) where T : IEntity<T>
Parameters
contextICommandContextmetadataIEntityInfocollectionIEntitySet<T>entityT
Returns
Type Parameters
T
GenerateEntityCommands<T>(ICommandContext, IEntityInfo, T)
public IReadOnlyList<Command> GenerateEntityCommands<T>(ICommandContext context, IEntityInfo metadata, T entity) where T : IEntity<T>
Parameters
contextICommandContextmetadataIEntityInfoentityT
Returns
Type Parameters
T
GenerateListCommands<T>(ICommandContext, IEntityInfo, IEntityQuery<T>)
public IReadOnlyList<Command> GenerateListCommands<T>(ICommandContext context, IEntityInfo metadata, IEntityQuery<T> entities) where T : IEntity<T>
Parameters
contextICommandContextmetadataIEntityInfoentitiesIEntityQuery<T>
Returns
Type Parameters
T
GenerateReferenceCommands<T>(ICommandContext, IEntityInfo, IOwnedValue<T?>)
public IReadOnlyList<Command> GenerateReferenceCommands<T>(ICommandContext context, IEntityInfo metadata, IOwnedValue<T?> reference) where T : IEntity<T>
Parameters
contextICommandContextmetadataIEntityInforeferenceIOwnedValue<T>
Returns
Type Parameters
T
GetRowMessage(IEntityInfo, IEntity)
public Message? GetRowMessage(IEntityInfo metadata, IEntity row)
Parameters
metadataIEntityInforowIEntity
Returns
LoadEntityAsync(IEntityInfo, IEntityContext, Guid)
public Task<IEntity> LoadEntityAsync(IEntityInfo metadata, IEntityContext context, Guid id)
Parameters
metadataIEntityInfocontextIEntityContextidGuid
Returns
LoadEntityAsync<T>(IEntityContext, Guid)
public Task<T> LoadEntityAsync<T>(IEntityContext context, Guid id) where T : IEntity<T>
Parameters
contextIEntityContextidGuid
Returns
- Task<T>
Type Parameters
T
ResolveHeight(FieldContext, IEntityInfo)
Measures an entire entity - fields plus a header row per section. FieldContext.Row should be the entity instance.
public FieldHeight ResolveHeight(FieldContext context, IEntityInfo metadata)
Parameters
contextFieldContextmetadataIEntityInfo
Returns
ResolveModels(FieldContext, IEntityInfo)
Resolve metadata's edit form into field models, grouped by section, under
context. This is the expensive scaffolding - one CreateModel(FieldContext, PropertyBinding)
per field, with its combinator chain. When Row is null the result depends
only on the chrome flags CreateModel can read, so it is cached and reused across renders;
entity-bound resolutions are rebuilt because they reflect mutable entity state. Field heights
are deliberately not baked in here - callers re-evaluate GetRows against the
live context - so making heights more dynamic never stales this cache.
public IReadOnlyList<IReadOnlyList<FieldModel>> ResolveModels(FieldContext context, IEntityInfo metadata)
Parameters
contextFieldContextmetadataIEntityInfo