Click or drag to resize

AssetStorage Class

A class providing access to Assets. An asset is considered any content to be loaded, de-serialized and converted during an application's lifetime. Often Assets should be loaded up-front and accessed during run-time with no perceivable delay. AssetStorage is a staticton (a singleton with an additional static interface).
Inheritance Hierarchy
SystemObject
  Fusee.Base.CoreAssetStorage

Namespace:  Fusee.Base.Core
Assembly:  Fusee.Base.Core (in Fusee.Base.Core.dll) Version: 0.7.0.0 (0.7.0.0)
Syntax
C#
public class AssetStorage

The AssetStorage type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberInstance
Implements the Singleton pattern.
Top
Methods
  NameDescription
Public methodStatic memberDeepCopyT
Creates a deep copy of the source object. Only works for source objects with the ProtoContractAttribute defined on their class.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodStatic memberGetT
Public methodGetAssetT
Retrieves the asset identified by id.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRegisterAssetProvider
Registers the given asset provider. Use this method to register asset providers for the platform (desktop, mobile, web) your main application should run on.
Public methodStatic memberRegisterProvider
Staticton implementation of RegisterAssetProvider(IAssetProvider).
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
The existance of this class is a tribute to the Web-world where a lot of asset types (e.g. images) are JavaScript built-in functionality with no possibility to separate the many aspects of asset-access (like loading, deserialization, codec, asynchronicity). Decent programming environments allow to separate these aspects using streams. A decoder is implemented against a stream. Anything capable of providing streams, synchronously or asynchronousliy thus can act as an asset store. If FUSEE had been designed without JavaScript X-compilation in mind, this class would probably not exist.
See Also