Interface ILazy<T>
- Namespace
- The.Relationships
- Assembly
- Instagile.dll
Represents entity data contained in a stateful property object which can be loaded in advance or on demand.
public interface ILazy<T> : ILazy
Type Parameters
T
- Inherited Members
Methods
AsLoaded()
Asserts that the property object is loaded and returns it; never performs I/O.
T AsLoaded()
Returns
- T
Exceptions
- InvalidOperationException
Thrown if the property or any reference along the path to it is unloaded.
GetAwaiter()
Awaiting the lazy is equivalent to calling LoadAsync(CancellationToken?); eager-loaded data completes synchronously.
TaskAwaiter<T> GetAwaiter()
Returns
- TaskAwaiter<T>
LoadAsync(CancellationToken?)
Loads the property object in at most one read batch.
Task<T> LoadAsync(CancellationToken? cancellationToken = null)
Parameters
cancellationTokenCancellationToken?
Returns
- Task<T>
LoadAsync(RelationshipPath[], CancellationToken?)
Loads the property object and related data in at most one read batch.
Task<T> LoadAsync(RelationshipPath[] includes, CancellationToken? cancellationToken = null)
Parameters
includesRelationshipPath[]cancellationTokenCancellationToken?
Returns
- Task<T>
LoadCachedAsync(RequestOptions?, CancellationToken?)
Loads the property object and related data in at most one read batch. Uses the entity cache if possible. If the result was stale, ValueChanged will be raised after validation.
Task<T> LoadCachedAsync(RequestOptions? options = null, CancellationToken? cancellationToken = null)
Parameters
optionsRequestOptionscancellationTokenCancellationToken?
Returns
- Task<T>
LoadCachedAsync(RequestOptions?, RelationshipPath[], CancellationToken?)
Loads the property object and related data in at most one read batch. Uses the entity cache if possible. If the result was stale, ValueChanged will be raised after validation.
Task<T> LoadCachedAsync(RequestOptions? options, RelationshipPath[] includes, CancellationToken? cancellationToken = null)
Parameters
optionsRequestOptionsincludesRelationshipPath[]cancellationTokenCancellationToken?
Returns
- Task<T>
TryGetLoaded(out T)
Returns the property object if it is loaded; never performs I/O. A loaded path or reference may be null.
bool TryGetLoaded(out T result)
Parameters
resultT