Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.InvetorySystem.StoragesDatabase.StorageContainer Class Reference

Detailed Description

Container that using as data entry for the StoragesDatabase.

Contains meta data related to the in-game storage instance that describes how to recreate it.

Used Storage prefab resource defined with the ISignedResource properties.

Not allows direct access to the items. Use TransactionService to handle items transfer.

See also
StoragesService
Inheritance diagram for Doloro.InvetorySystem.StoragesDatabase.StorageContainer:
Collaboration diagram for Doloro.InvetorySystem.StoragesDatabase.StorageContainer:

Public Member Functions

 StorageContainer ()
 Empty constructor.
 
 StorageContainer (Guid id)
 Creates storage with predefined id. More...
 
 StorageContainer (SerializationInfo info, StreamingContext context)
 Allows to binary serializer instantiate the object from binary. More...
 
ItemContainer Find (Item item)
 Looks for entry related to the source item. More...
 
ItemContainer Find (string bundle, string key)
 Looks for storage entry related to the resource. More...
 
IEnumerator< ItemContainerGetEnumerator ()
 Returns enumerator of stored items. More...
 
void Dispose ()
 Releases entire on-scene temporal resources.
 
void SetFeatureState (FeatureType prop)
 Collects session data from the property and stores it in container. More...
 
void SetFeatureState (Type propType, byte[] data)
 Collects session data from the property and stores it in container. More...
 
void SetFeatureState (string propFullType, byte[] data)
 Collects session data from the property and stores it in container. More...
 
bool ContainsFeatureState (FeatureType prop)
 Checks is the container contains binary data related to the property. More...
 
bool ContainsFeatureState (Type prop)
 Checks is the container contains binary data related to the property. More...
 
bool ContainsFeatureState (string prop)
 Checks is the container contains binary data related to the property. More...
 
bool DropFeatureState (Type prop)
 Drops property related data. More...
 
bool DropFeatureState (string prop)
 Drops property data. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Protected Attributes

List< ItemContainerentries = new List<ItemContainer>()
 Entries registered inside the storage.
 

Package Functions

virtual void Add (ItemContainer item)
 Adding container for the entries. More...
 
virtual bool Remove (ItemContainer item)
 Removes container from internal entries. More...
 
void OnChangeInternal ()
 Allows to access ADataContainer.Changed handler.
 

Properties

string Bundle [get, set]
 Resource bundle key related to the Storage resource binded to the data set. More...
 
string Key [get, set]
 Resource key related to the Storage resource binded to the data set. More...
 
FeatureContainer this[Type type] [get]
 Returns FeatureContainer by type in string format in case if it exists. More...
 
FeatureContainer this[string type] [get]
 Returns FeatureContainer by type in string format in case if it exists. More...
 
Dictionary< string, FeatureContainerfeatures [get]
 Collection of FeatureType related cross-session data in binary format.
 

Constructor & Destructor Documentation

◆ StorageContainer() [1/2]

Doloro.InvetorySystem.StoragesDatabase.StorageContainer.StorageContainer ( Guid  id)

Creates storage with predefined id.

Parameters
idId to set.

◆ StorageContainer() [2/2]

Doloro.InvetorySystem.StoragesDatabase.StorageContainer.StorageContainer ( SerializationInfo  info,
StreamingContext  context 
)

Allows to binary serializer instantiate the object from binary.

Parameters
info
context

Member Function Documentation

◆ Add()

virtual void Doloro.InvetorySystem.StoragesDatabase.StorageContainer.Add ( ItemContainer  item)
packagevirtual

Adding container for the entries.

Parameters
itemItem container to add.
Exceptions
NotSupportedExceptionAttempt to add container for the item that already registered at the container.

◆ ContainsFeatureState() [1/3]

bool Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.ContainsFeatureState ( FeatureType  prop)
inherited

Checks is the container contains binary data related to the property.

Parameters
propProperty to check.
Returns
true in case if there is stored property data.

◆ ContainsFeatureState() [2/3]

bool Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.ContainsFeatureState ( string  prop)
inherited

Checks is the container contains binary data related to the property.

Parameters
propProperty to check.
Returns
true in case if there is stored property data.

◆ ContainsFeatureState() [3/3]

bool Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.ContainsFeatureState ( Type  prop)
inherited

Checks is the container contains binary data related to the property.

Parameters
propProperty to check.
Returns
true in case if there is stored property data.

◆ DropFeatureState() [1/2]

bool Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.DropFeatureState ( string  prop)
inherited

Drops property data.

Parameters
propProperty name to release.
Returns
Is the property container has been found and released.

◆ DropFeatureState() [2/2]

bool Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.DropFeatureState ( Type  prop)
inherited

Drops property related data.

Parameters
propType of the FeatureType to data release.
Returns
Is the property container has been found and released.

◆ Find() [1/2]

ItemContainer Doloro.InvetorySystem.StoragesDatabase.StorageContainer.Find ( Item  item)

Looks for entry related to the source item.

Parameters
itemitem resource that contains meta data.
Returns
Database entry in case if found. null otherwise.

◆ Find() [2/2]

ItemContainer Doloro.InvetorySystem.StoragesDatabase.StorageContainer.Find ( string  bundle,
string  key 
)

Looks for storage entry related to the resource.

Parameters
bundleResources bundle key related to the resource.
keyResource key.
Returns
Database entry in case if found. null otherwise.

◆ GetEnumerator()

IEnumerator< ItemContainer > Doloro.InvetorySystem.StoragesDatabase.StorageContainer.GetEnumerator ( )

Returns enumerator of stored items.

Returns

◆ Remove()

virtual bool Doloro.InvetorySystem.StoragesDatabase.StorageContainer.Remove ( ItemContainer  item)
packagevirtual

Removes container from internal entries.

Parameters
itemContainer to remove.
Returns
true in case if successfully removed from the storage. false in case if not found.

◆ SetFeatureState() [1/3]

void Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.SetFeatureState ( FeatureType  prop)
inherited

Collects session data from the property and stores it in container.

Parameters
propProperty to data save.

◆ SetFeatureState() [2/3]

void Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.SetFeatureState ( string  propFullType,
byte[]  data 
)
inherited

Collects session data from the property and stores it in container.

Parameters
propFullTypeFull name of property's type related to the data.
dataBinary data related to the property.

◆ SetFeatureState() [3/3]

void Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.SetFeatureState ( Type  propType,
byte[]  data 
)
inherited

Collects session data from the property and stores it in container.

Parameters
propTypeProperty type related to the data.
dataBinary data related to the property.

Property Documentation

◆ Bundle

string Doloro.InvetorySystem.StoragesDatabase.StorageContainer.Bundle
getset

Resource bundle key related to the Storage resource binded to the data set.

default in case if not defined.

Implements Doloro.DataManagement.DynamicResources.ISignedResource.

◆ Key

string Doloro.InvetorySystem.StoragesDatabase.StorageContainer.Key
getset

Resource key related to the Storage resource binded to the data set.

storage in case if not defined.

Implements Doloro.DataManagement.DynamicResources.ISignedResource.

◆ this[string type]

FeatureContainer Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.this[string type]
getinherited

Returns FeatureContainer by type in string format in case if it exists.

Parameters
typeType in string format received with the Type.FullName
Returns
Cross-session property data or null in case if not found.

◆ this[Type type]

FeatureContainer Doloro.InvetorySystem.StoragesDatabase.AFeaturesHolderContainer< FeatureType, ContainerType >.this[Type type]
getinherited

Returns FeatureContainer by type in string format in case if it exists.

Parameters
typeType of the FeatureType instance.
Returns
Cross-session property data or null in case if not found.

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