API ReferenceSandbox.Resources
public abstract class Sandbox.Resources.ResourceGenerator<T> : Sandbox.Resources.ResourceGenerator
A resource generator targetting a specific type
Constructors
Showing 1 constructors
protected ResourceGenerator<T>()
No results match this filter.
Methods
Showing 8 methods
public void AddToCache(T val)
public virtual T Create(Sandbox.Resources.ResourceGenerator.Options options)
Create the resource blocking
public virtual System.Threading.Tasks.ValueTask`1<T> CreateAsync(Sandbox.Resources.ResourceGenerator.Options options, System.Threading.CancellationToken token)
Create the resource asyncronously
public virtual T FindCached()
Find a previously created of this resource
public virtual T FindOrCreate(Sandbox.Resources.ResourceGenerator.Options options)
If we generated this before, then find the current cache'd value. If not, then generate a new one.
public virtual System.Threading.Tasks.ValueTask`1<T> FindOrCreateAsync(Sandbox.Resources.ResourceGenerator.Options options, System.Threading.CancellationToken token)
If we generated this before, then find the current cache'd value. If not, then generate a new one.
public virtual Sandbox.Resource FindOrCreateObject(Sandbox.Resources.ResourceGenerator.Options options)
public virtual System.Threading.Tasks.ValueTask`1<Sandbox.Resource> FindOrCreateObjectAsync(Sandbox.Resources.ResourceGenerator.Options options, System.Threading.CancellationToken token)
No results match this filter.
Properties
Showing 1 properties
public virtual bool Sandbox.Resources.ResourceGenerator<T>.UseMemoryCache { get; set; }
If true then the generation will avoid creating duplicate resources by checking hash codes of previously generated resources and re-using them if possible.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox.Resources |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.Resources.ResourceGenerator`1 |