Class MyObjectBuilderSerializer
Inheritance
System.Object
MyObjectBuilderSerializer
Assembly: VRage.Game.dll
Syntax
public class MyObjectBuilderSerializer : Object
Constructors
MyObjectBuilderSerializer()
Declaration
public MyObjectBuilderSerializer()
Methods
Clone(MyObjectBuilder_Base)
Declaration
public static MyObjectBuilder_Base Clone(MyObjectBuilder_Base toClone)
Parameters
Returns
CreateNewObject(MyObjectBuilderType)
Declaration
public static MyObjectBuilder_Base CreateNewObject(MyObjectBuilderType type)
Parameters
Returns
CreateNewObject(MyObjectBuilderType, String)
Declaration
public static MyObjectBuilder_Base CreateNewObject(MyObjectBuilderType type, string subtypeName)
Parameters
Returns
CreateNewObject(SerializableDefinitionId)
Declaration
public static MyObjectBuilder_Base CreateNewObject(SerializableDefinitionId id)
Parameters
Returns
CreateNewObject<T>()
Declaration
public static T CreateNewObject<T>()
where T : MyObjectBuilder_Base, new()
Returns
Type Parameters
CreateNewObject<T>(String)
Declaration
public static T CreateNewObject<T>(string subtypeName)
where T : MyObjectBuilder_Base, new()
Parameters
Type |
Name |
Description |
System.String |
subtypeName |
|
Returns
Type Parameters
DeserializePB<T>(Byte[], out T, out UInt64)
Declaration
public static bool DeserializePB<T>(byte[] data, out T objectBuilder, out ulong fileSize)
where T : MyObjectBuilder_Base
Parameters
Type |
Name |
Description |
System.Byte[] |
data |
|
T |
objectBuilder |
|
System.UInt64 |
fileSize |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
DeserializePB<T>(String, out T)
Deserialize data by protobuf
Declaration
public static bool DeserializePB<T>(string path, out T objectBuilder)
where T : MyObjectBuilder_Base
Parameters
Type |
Name |
Description |
System.String |
path |
path
|
T |
objectBuilder |
instance
|
Returns
Type |
Description |
System.Boolean |
false when fails
|
Type Parameters
Name |
Description |
T |
object builder type
|
DeserializePB<T>(String, out T, out UInt64)
Deserialize data by protobuf
Declaration
public static bool DeserializePB<T>(string path, out T objectBuilder, out ulong fileSize)
where T : MyObjectBuilder_Base
Parameters
Type |
Name |
Description |
System.String |
path |
path
|
T |
objectBuilder |
instance
|
System.UInt64 |
fileSize |
size of the file
|
Returns
Type |
Description |
System.Boolean |
false when fails
|
Type Parameters
Name |
Description |
T |
object builder type
|
DeserializeXML(String, out MyObjectBuilder_Base, Type)
Declaration
public static bool DeserializeXML(string path, out MyObjectBuilder_Base objectBuilder, Type builderType)
Parameters
Returns
Type |
Description |
System.Boolean |
|
DeserializeXML<T>(Byte[], out T, out UInt64)
Declaration
public static bool DeserializeXML<T>(byte[] xmlData, out T objectBuilder, out ulong fileSize)
where T : MyObjectBuilder_Base
Parameters
Type |
Name |
Description |
System.Byte[] |
xmlData |
|
T |
objectBuilder |
|
System.UInt64 |
fileSize |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
DeserializeXML<T>(String, out T)
Declaration
public static bool DeserializeXML<T>(string path, out T objectBuilder)
where T : MyObjectBuilder_Base
Parameters
Type |
Name |
Description |
System.String |
path |
|
T |
objectBuilder |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
DeserializeXML<T>(String, out T, out UInt64)
Declaration
public static bool DeserializeXML<T>(string path, out T objectBuilder, out ulong fileSize)
where T : MyObjectBuilder_Base
Parameters
Type |
Name |
Description |
System.String |
path |
|
T |
objectBuilder |
|
System.UInt64 |
fileSize |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
SerializePB(String, Boolean, MyObjectBuilder_Base)
Declaration
public static bool SerializePB(string path, bool compress, MyObjectBuilder_Base objectBuilder)
Parameters
Returns
Type |
Description |
System.Boolean |
|
SerializePB(String, Boolean, MyObjectBuilder_Base, out UInt64)
Declaration
public static bool SerializePB(string path, bool compress, MyObjectBuilder_Base objectBuilder, out ulong sizeInBytes)
Parameters
Type |
Name |
Description |
System.String |
path |
|
System.Boolean |
compress |
|
MyObjectBuilder_Base |
objectBuilder |
|
System.UInt64 |
sizeInBytes |
|
Returns
Type |
Description |
System.Boolean |
|
SerializeXML(String, Boolean, MyObjectBuilder_Base, Type)
Declaration
public static bool SerializeXML(string path, bool compress, MyObjectBuilder_Base objectBuilder, Type serializeAsType = null)
Parameters
Type |
Name |
Description |
System.String |
path |
|
System.Boolean |
compress |
|
MyObjectBuilder_Base |
objectBuilder |
|
System.Type |
serializeAsType |
|
Returns
Type |
Description |
System.Boolean |
|
SerializeXML(String, Boolean, MyObjectBuilder_Base, out UInt64, Type)
Declaration
public static bool SerializeXML(string path, bool compress, MyObjectBuilder_Base objectBuilder, out ulong sizeInBytes, Type serializeAsType = null)
Parameters
Type |
Name |
Description |
System.String |
path |
|
System.Boolean |
compress |
|
MyObjectBuilder_Base |
objectBuilder |
|
System.UInt64 |
sizeInBytes |
|
System.Type |
serializeAsType |
|
Returns
Type |
Description |
System.Boolean |
|