Table of Contents

Class EntityListViewBase<T>

Namespace
The.Web.Entities
Assembly
Instagile.Web.Client.dll

Shared loading, virtualisation, command and export machinery behind the entity-list render shapes (the EntityListView<T> table and the EntityListViews<T> card stack). Subclasses provide only their own markup and their chrome source.

public abstract class EntityListViewBase<T> : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable where T : IEntity<T>

Type Parameters

T
Inheritance
EntityListViewBase<T>
Implements
Derived
Inherited Members

Fields

_Columns

protected IReadOnlyList<ColumnModel> _Columns

Field Value

IReadOnlyList<ColumnModel>

_FirstPageLoaded

protected bool _FirstPageLoaded

Field Value

bool

_IncludedRelationships

protected HashSet<RelationshipInfo> _IncludedRelationships

Field Value

HashSet<RelationshipInfo>

_Ordering

protected IReadOnlyList<ListOrdering> _Ordering

Field Value

IReadOnlyList<ListOrdering>

_ResolvedCount

protected int? _ResolvedCount

Field Value

int?

Properties

AllowDirtyReads

Loads entity data without a transaction.

[Parameter]
public bool AllowDirtyReads { get; set; }

Property Value

bool

Count

Item count for Query, if the caller already knows it. Fetched automatically otherwise.

[Parameter]
public int? Count { get; set; }

Property Value

int?

Logger

protected ILogger Logger { get; }

Property Value

ILogger

LoggerFactory

[Inject]
protected ILoggerFactory LoggerFactory { get; set; }

Property Value

ILoggerFactory

Options

[Inject]
protected Options Options { get; set; }

Property Value

Options

OwnsCount

Whether this component resolves the query count itself. EntityListViews<T> returns false while delegating to an inner EntityListView<T>.

protected virtual bool OwnsCount { get; }

Property Value

bool

PersistKey

Distinguishes this list's persisted prerender state from identical lists on the same page.

[Parameter]
public string? PersistKey { get; set; }

Property Value

string

Query

The entities to list.

[Parameter]
[EditorRequired]
public required IEntityQuery<T> Query { get; set; }

Property Value

IEntityQuery<T>

Services

[Inject]
protected IServices Services { get; set; }

Property Value

IServices

Type

Type of the entities to list. See IListSpec to customise the generated columns.

[Parameter]
[EditorRequired]
public required IEntityInfo Type { get; set; }

Property Value

IEntityInfo

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetCommands(ICommandContext)

protected IEnumerable<Command> GetCommands(ICommandContext context)

Parameters

context ICommandContext

Returns

IEnumerable<Command>

GetExportCommands(ICommandContext)

protected IEnumerable<Command> GetExportCommands(ICommandContext cc)

Parameters

cc ICommandContext

Returns

IEnumerable<Command>

GetItemCountText()

protected string GetItemCountText()

Returns

string

GetRowClass(Message?)

protected string GetRowClass(Message? message)

Parameters

message Message?

Returns

string

GetRowCommands(ICommandContext, T)

protected IEnumerable<Command> GetRowCommands(ICommandContext context, T rowValue)

Parameters

context ICommandContext
rowValue T

Returns

IEnumerable<Command>

GetRowMessage(T)

The scaffolded status message for a row, or null for the default (untinted) presentation.

protected Message? GetRowMessage(T rowValue)

Parameters

rowValue T

Returns

Message?

LoadPage(ItemsProviderRequest)

protected ValueTask<ItemsProviderResult<BindingResult<T>>> LoadPage(ItemsProviderRequest request)

Parameters

request ItemsProviderRequest

Returns

ValueTask<ItemsProviderResult<BindingResult<T>>>

OnColumnsExtracted()

Hook that runs once, immediately after the column set has been extracted.

protected virtual void OnColumnsExtracted()

OnListParametersSet()

Per-parameter-set hook for subclass chrome handling. Runs on every parameter set, before the column set is ensured.

protected virtual void OnListParametersSet()

OnParametersSetAsync()

Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.

protected override Task OnParametersSetAsync()

Returns

Task

A Task representing any asynchronous operation.