Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.DataManagement.DynamicResources.ResourcesManager Class Reference

Detailed Description

Provides common API for handling resources.

Public Member Functions

delegate void CollectionHandler (ResourcesCollection collection)
 Delegate using for ResourcesCollection handlers. More...
 
delegate void CollectionPairHandler (System.Type origineObjectType, ResourcesCollection collection)
 Delegate for pair data sets handlers. More...
 
delegate void FilteredCollectionPairHandler (System.Type origineObjectType, IResourceFilter[] filters, ResourcesCollection collection)
 Delegate for pair data sets handlers. More...
 

Static Public Member Functions

static string GenerateRCKey< T > ()
 Generates the value for the ResourcesCollection.Key property. More...
 
static string GenerateRCKey< T > (params IResourceFilter[] filters)
 Generates the value for the ResourcesCollection.Key property. More...
 
static void DropRegisteredCollection (ResourcesCollection collection)
 Call when you affect the loaded resources outside form the system. I will drops hashed data and inform internal services about. More...
 
static void DropRegisteredCollection (string searchKey)
 Call when you affect the loaded resources outside form the system. I will drops hashed data and inform internal services about. More...
 
static ResourcesCollection FindCached (string key)
 Looking for the previous loaded ResourcesCollection by the collection key. More...
 
static void ForceCollectionToCache (ResourcesCollection collection)
 Forcing some ResourcesCollection to be added into the search results. More...
 
static void FindAllResourcesAsync< T > (CollectionHandler handler, string localResourcesPath="")
 Asynchronicity looks for resources of the certain type More...
 
static void FindAllResourcesAsync< T > (CollectionPairHandler handler, string localResourcesPath="")
 Asynchronicity looks for resources of the certain type More...
 
static void FindAllResourcesAsync< T > (CollectionHandler handler, params IResourceFilter[] filters)
 Looking for resources with content filter. More...
 
static void FindAllResourcesAsync< T > (FilteredCollectionPairHandler handler, params IResourceFilter[] filters)
 Looking for resources with content filter. More...
 

Properties

static int ScannedCollections [get]
 Count of search requests hashed at the moment.
 
static int SearchesInProcessing [get]
 How many search requests started at the moment.
 

Events

static CollectionPairHandler NewResourcesSearchFinished
 Occurs when FindAllResourcesAsync<T>(CollectionPairHandler, string) or similar search operation for type not searched before is finished. Allows to ignore async architecture of framework and use it with event-based architecture.
 
static FilteredCollectionPairHandler NewFilteredResourcesSearchFinished
 Occurs when FindAllResourcesAsync<T>(CollectionPairHandler, string) or similar search operation for type with filters not searched before is finished. Allows to ignore async architecture of framework and use it with event-based architecture.
 

Member Function Documentation

◆ CollectionHandler()

delegate void Doloro.DataManagement.DynamicResources.ResourcesManager.CollectionHandler ( ResourcesCollection  collection)

Delegate using for ResourcesCollection handlers.

Parameters
collectionCollection in resources in processing.

◆ CollectionPairHandler()

delegate void Doloro.DataManagement.DynamicResources.ResourcesManager.CollectionPairHandler ( System.Type  origineObjectType,
ResourcesCollection  collection 
)

Delegate for pair data sets handlers.

Parameters
origineObjectTypeType of origin object handled withing the collection.
collectionCollection of resources related to the type.

◆ DropRegisteredCollection() [1/2]

static void Doloro.DataManagement.DynamicResources.ResourcesManager.DropRegisteredCollection ( ResourcesCollection  collection)
static

Call when you affect the loaded resources outside form the system. I will drops hashed data and inform internal services about.

Parameters
collectionCollection to drop from registration.
See also
DropRegisteredCollection(string)

◆ DropRegisteredCollection() [2/2]

static void Doloro.DataManagement.DynamicResources.ResourcesManager.DropRegisteredCollection ( string  searchKey)
static

Call when you affect the loaded resources outside form the system. I will drops hashed data and inform internal services about.

Parameters
searchKeySignature of the resources collection that was updated.
See also
ResourcesCollection.Key

Cases

Manual resource unload.

In the case of manual resources unload out of RAM the references into catalogs will be loosed.

◆ FilteredCollectionPairHandler()

delegate void Doloro.DataManagement.DynamicResources.ResourcesManager.FilteredCollectionPairHandler ( System.Type  origineObjectType,
IResourceFilter[]  filters,
ResourcesCollection  collection 
)

Delegate for pair data sets handlers.

Parameters
origineObjectTypeType of origin object handled withing the collection.
filtersFilters applied to base collection of origin type resources.
collectionCollection of resources related to the type.

◆ FindAllResourcesAsync< T >() [1/4]

static void Doloro.DataManagement.DynamicResources.ResourcesManager.FindAllResourcesAsync< T > ( CollectionHandler  handler,
params IResourceFilter[]  filters 
)
static

Looking for resources with content filter.

Template Parameters
TType of the resources.

In case if subclass of the MonoBehaviour then system automatically reassemble the search query with extra filters to searching the type among components.

Parameters
handlerHandler that will called when search will be finished.
filtersFilters that checking is the content passing through the request or not.
Type Constraints
T :Object 

◆ FindAllResourcesAsync< T >() [2/4]

static void Doloro.DataManagement.DynamicResources.ResourcesManager.FindAllResourcesAsync< T > ( CollectionHandler  handler,
string  localResourcesPath = "" 
)
static

Asynchronicity looks for resources of the certain type

Template Parameters
TType of resource.

In case if subclass of the MonoBehaviour then system automatically reassemble the search query with extra filters to searching the type among components.

Parameters
handlerHandler that will be called after resources loading to process the data.
localResourcesPathPath to resources from the local resources.
Type Constraints
T :Object 

◆ FindAllResourcesAsync< T >() [3/4]

static void Doloro.DataManagement.DynamicResources.ResourcesManager.FindAllResourcesAsync< T > ( CollectionPairHandler  handler,
string  localResourcesPath = "" 
)
static

Asynchronicity looks for resources of the certain type

Template Parameters
TType of resource.

In case if subclass of the MonoBehaviour then system automatically reassemble the search query with extra filters to searching the type among components.

Parameters
handlerHandler that will be called after resources loading to process the data.
localResourcesPathPath to resources from the local resources.
Type Constraints
T :Object 

◆ FindAllResourcesAsync< T >() [4/4]

static void Doloro.DataManagement.DynamicResources.ResourcesManager.FindAllResourcesAsync< T > ( FilteredCollectionPairHandler  handler,
params IResourceFilter[]  filters 
)
static

Looking for resources with content filter.

Template Parameters
TType of the resources.

In case if subclass of the MonoBehaviour then system automatically reassemble the search query with extra filters to searching the type among components.

Parameters
handlerHandler that will called when search will be finished.
filtersFilters that checking is the content passing through the request or not.
Type Constraints
T :Object 

◆ FindCached()

static ResourcesCollection Doloro.DataManagement.DynamicResources.ResourcesManager.FindCached ( string  key)
static

Looking for the previous loaded ResourcesCollection by the collection key.

Parameters
keyResourcesCollection.Key value.
Returns
Reference to the collection. null if not found.

GenerateRCKey<T>() GenerateRCKey<T>(IResourceFilter[])

◆ ForceCollectionToCache()

static void Doloro.DataManagement.DynamicResources.ResourcesManager.ForceCollectionToCache ( ResourcesCollection  collection)
static

Forcing some ResourcesCollection to be added into the search results.

Parameters
collection
Exceptions
System.NullReferenceExceptioncollection is null.
System.ArgumentExceptionResourcesCollection.Key is null, empty or whitespace.

Use it when you somehow filtering or gathering resources outside of common handlers.

The call will override existing entry with the same ResourcesCollection.Key value if exists.

◆ GenerateRCKey< T >() [1/2]

static string Doloro.DataManagement.DynamicResources.ResourcesManager.GenerateRCKey< T > ( )
static

Generates the value for the ResourcesCollection.Key property.

Template Parameters
TResources type.
Returns
String key.

◆ GenerateRCKey< T >() [2/2]

static string Doloro.DataManagement.DynamicResources.ResourcesManager.GenerateRCKey< T > ( params IResourceFilter[]  filters)
static

Generates the value for the ResourcesCollection.Key property.

Template Parameters
TResources type.
Parameters
filtersFilters applied to the collection.
Returns
String key.

The documentation for this class was generated from the following file: