Class Persistence
- Namespace
- Lime
- Assembly
- Lime.dll
public class Persistence
- Inheritance
-
Persistence
- Inherited Members
Constructors
Persistence()
public Persistence()
Persistence(CommonOptions, JsonSerializeOptions)
public Persistence(CommonOptions yuzuOptions, JsonSerializeOptions yuzuJsonOptions)
Parameters
yuzuOptions
CommonOptionsyuzuJsonOptions
JsonSerializeOptions
Fields
Context
public IPersistenceContext Context
Field Value
YuzuJsonOptions
public readonly JsonSerializeOptions YuzuJsonOptions
Field Value
- JsonSerializeOptions
YuzuOptions
public readonly CommonOptions YuzuOptions
Field Value
- CommonOptions
Methods
CalcObjectCheckSum(object)
public virtual int CalcObjectCheckSum(object @object)
Parameters
object
object
Returns
Clone(object)
Clone object using Yuzu.Clone.
public object Clone(object obj)
Parameters
obj
objectA source object to clone.
Returns
Clone<T>(T)
Clone object using Yuzu.Clone.
public T Clone<T>(T obj)
Parameters
obj
TA source object to clone.
Returns
- T
Type Parameters
T
A type of object that need to be returned.
DeduceFormat(Stream)
protected static Persistence.Format DeduceFormat(Stream stream)
Parameters
stream
Stream
Returns
ReadFromBundle<T>(AssetBundle, string, object)
public virtual T ReadFromBundle<T>(AssetBundle bundle, string path, object @object = null)
Parameters
bundle
AssetBundlepath
stringobject
object
Returns
- T
Type Parameters
T
ReadFromCurrentBundle<T>(string, object)
public T ReadFromCurrentBundle<T>(string path, object @object = null)
Parameters
Returns
- T
Type Parameters
T
ReadFromFile<T>(string, object)
public virtual T ReadFromFile<T>(string path, object @object = null)
Parameters
Returns
- T
Type Parameters
T
ReadFromStream<T>(Stream, object)
public virtual T ReadFromStream<T>(Stream stream, object @object = null)
Parameters
Returns
- T
Type Parameters
T
ReadFromString<T>(string, object)
public virtual T ReadFromString<T>(string source, object @object = null)
Parameters
Returns
- T
Type Parameters
T
ReadMetadataFromCurrentBundle(string)
public IEnumerable<Metadata> ReadMetadataFromCurrentBundle(string path)
Parameters
path
string
Returns
ReadMetadataFromFile(string)
public IEnumerable<Metadata> ReadMetadataFromFile(string path)
Parameters
path
string
Returns
ReadMetadataFromStream(Stream)
public IEnumerable<Metadata> ReadMetadataFromStream(Stream stream)
Parameters
stream
Stream
Returns
TryReadDocumentHeaderFromCurrentBundle(string)
public DocumentHeader TryReadDocumentHeaderFromCurrentBundle(string path)
Parameters
path
string
Returns
TryReadDocumentHeaderFromFile(string)
public DocumentHeader TryReadDocumentHeaderFromFile(string path)
Parameters
path
string
Returns
TryReadDocumentHeaderFromStream(Stream)
public DocumentHeader TryReadDocumentHeaderFromStream(Stream stream)
Parameters
stream
Stream
Returns
WriteToBundle(AssetBundle, string, object, Format, SHA256, AssetAttributes)
public virtual void WriteToBundle(AssetBundle bundle, string path, object @object, Persistence.Format format, SHA256 originHash, AssetAttributes attributes)
Parameters
bundle
AssetBundlepath
stringobject
objectformat
Persistence.FormatoriginHash
SHA256attributes
AssetAttributes
WriteToFile(string, object, Format)
public virtual void WriteToFile(string path, object @object, Persistence.Format format)
Parameters
path
stringobject
objectformat
Persistence.Format
WriteToStream(Stream, object, Format)
public virtual void WriteToStream(Stream stream, object @object, Persistence.Format format)
Parameters
stream
Streamobject
objectformat
Persistence.Format
WriteToString(object, Format)
public virtual string WriteToString(object @object, Persistence.Format format)
Parameters
object
objectformat
Persistence.Format