Table of Contents

Class EntityState<T>

Namespace
The.Web.Entities
Assembly
Instagile.Web.Client.dll
public class EntityState<T> : IDisposable where T : class, IEntity

Type Parameters

T
Inheritance
EntityState<T>
Implements
Inherited Members

Constructors

EntityState(IServices, Options, PersistentComponentState, ILogger<EntityState<T>>)

public EntityState(IServices services, Options options, PersistentComponentState applicationState, ILogger<EntityState<T>> logger)

Parameters

services IServices
options Options
applicationState PersistentComponentState
logger ILogger<EntityState<T>>

Methods

Dispose()

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

public void Dispose()

RegisterPersist(T, string)

Serialises entity under key when prerendering completes.

public void RegisterPersist(T entity, string key)

Parameters

entity T
key string

TryRestore(string, out T?, IEntityContext?)

Deserialises the entity persisted under key by a previous render, re-registering it for any further persistence.

public bool TryRestore(string key, out T? entity, IEntityContext? context = null)

Parameters

key string
entity T
context IEntityContext

Returns

bool