Table of Contents

Class ScaffoldService

Namespace
The.Web.Entities
Assembly
Instagile.Web.Client.dll
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

commandOverrides IEnumerable<ICommandSpec>
editOverrides IEnumerable<IEditSpec>
listOverrides IEnumerable<IListSpec>
criteriaOverrides IEnumerable<ICriteriaSpec>
options Options

Properties

ImageLimit

public long ImageLimit { get; }

Property Value

long

ProgressDelay

public TimeSpan ProgressDelay { get; }

Property Value

TimeSpan

SearchDelay

public TimeSpan SearchDelay { get; }

Property Value

TimeSpan

UploadLimit

public long UploadLimit { get; }

Property Value

long

Methods

CreateEntityAsync(IEntityInfo, IEntityContext, Guid?)

public Task<IEntity> CreateEntityAsync(IEntityInfo metadata, IEntityContext context, Guid? id = null)

Parameters

metadata IEntityInfo
context IEntityContext
id Guid?

Returns

Task<IEntity>

CreateEntityAsync<T>(IEntityContext, Guid?)

public Task<T> CreateEntityAsync<T>(IEntityContext context, Guid? id = null) where T : IEntity<T>

Parameters

context IEntityContext
id Guid?

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

metadata IEntityInfo
services IServices

Returns

IReadOnlyList<ColumnModel>

ExtractColumns(IEntityInfo)

public IReadOnlyList<ColumnSpec> ExtractColumns(IEntityInfo metadata)

Parameters

metadata IEntityInfo

Returns

IReadOnlyList<ColumnSpec>

ExtractCriteria(IEntityInfo)

public IReadOnlyList<CriterionSpec> ExtractCriteria(IEntityInfo metadata)

Parameters

metadata IEntityInfo

Returns

IReadOnlyList<CriterionSpec>

ExtractOrdering(IEntityInfo)

public IReadOnlyList<ListOrdering> ExtractOrdering(IEntityInfo metadata)

Parameters

metadata IEntityInfo

Returns

IReadOnlyList<ListOrdering>

ExtractSection(IEntityInfo, string)

public SectionSpec ExtractSection(IEntityInfo metadata, string name)

Parameters

metadata IEntityInfo
name string

Returns

SectionSpec

ExtractSections(IEntityInfo)

public IReadOnlyList<SectionSpec> ExtractSections(IEntityInfo metadata)

Parameters

metadata IEntityInfo

Returns

IReadOnlyList<SectionSpec>

GenerateCollectionCommands<T>(ICommandContext, IEntityInfo, IEntitySet<T>)

public IReadOnlyList<Command> GenerateCollectionCommands<T>(ICommandContext context, IEntityInfo metadata, IEntitySet<T> collection) where T : IEntity<T>

Parameters

context ICommandContext
metadata IEntityInfo
collection IEntitySet<T>

Returns

IReadOnlyList<Command>

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

context ICommandContext
metadata IEntityInfo
collection IEntitySet<T>
entity T

Returns

IReadOnlyList<Command>

Type Parameters

T

GenerateEntityCommands<T>(ICommandContext, IEntityInfo, T)

public IReadOnlyList<Command> GenerateEntityCommands<T>(ICommandContext context, IEntityInfo metadata, T entity) where T : IEntity<T>

Parameters

context ICommandContext
metadata IEntityInfo
entity T

Returns

IReadOnlyList<Command>

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

context ICommandContext
metadata IEntityInfo
entities IEntityQuery<T>

Returns

IReadOnlyList<Command>

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

context ICommandContext
metadata IEntityInfo
reference IOwnedValue<T>

Returns

IReadOnlyList<Command>

Type Parameters

T

GetRowMessage(IEntityInfo, IEntity)

public Message? GetRowMessage(IEntityInfo metadata, IEntity row)

Parameters

metadata IEntityInfo
row IEntity

Returns

Message?

LoadEntityAsync(IEntityInfo, IEntityContext, Guid)

public Task<IEntity> LoadEntityAsync(IEntityInfo metadata, IEntityContext context, Guid id)

Parameters

metadata IEntityInfo
context IEntityContext
id Guid

Returns

Task<IEntity>

LoadEntityAsync<T>(IEntityContext, Guid)

public Task<T> LoadEntityAsync<T>(IEntityContext context, Guid id) where T : IEntity<T>

Parameters

context IEntityContext
id Guid

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

context FieldContext
metadata IEntityInfo

Returns

FieldHeight

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

context FieldContext
metadata IEntityInfo

Returns

IReadOnlyList<IReadOnlyList<FieldModel>>