Files
Studio/Assets/Scripts/GeneratedMessagePackResolver.cs
2025-04-02 17:07:24 +09:00

880 lines
40 KiB
C#

// <auto-generated>
// THIS (.cs) FILE IS GENERATED BY MPC(MessagePack-CSharp). DO NOT CHANGE IT.
// </auto-generated>
#pragma warning disable 618
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
#pragma warning disable CS1591 // document public APIs
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1649 // File name should match first type name
namespace MessagePack.Resolvers
{
public class GeneratedResolver : global::MessagePack.IFormatterResolver
{
public static readonly global::MessagePack.IFormatterResolver Instance = new GeneratedResolver();
private GeneratedResolver()
{
}
public global::MessagePack.Formatters.IMessagePackFormatter<T> GetFormatter<T>()
{
return FormatterCache<T>.Formatter;
}
private static class FormatterCache<T>
{
internal static readonly global::MessagePack.Formatters.IMessagePackFormatter<T> Formatter;
static FormatterCache()
{
var f = GeneratedResolverGetFormatterHelper.GetFormatter(typeof(T));
if (f != null)
{
Formatter = (global::MessagePack.Formatters.IMessagePackFormatter<T>)f;
}
}
}
}
internal static class GeneratedResolverGetFormatterHelper
{
private static readonly global::System.Collections.Generic.Dictionary<global::System.Type, int> lookup;
static GeneratedResolverGetFormatterHelper()
{
lookup = new global::System.Collections.Generic.Dictionary<global::System.Type, int>(23)
{
{ typeof(global::XED.Manage.MaterialPropertyData[]), 0 },
{ typeof(global::XED.Manage.ModelData[]), 1 },
{ typeof(global::XED.Manage.SavedModelData[]), 2 },
{ typeof(global::XED.Manage.SerializableVector2[]), 3 },
{ typeof(global::XED.Manage.SerializableVector3[]), 4 },
{ typeof(global::XED.Manage.SerializableVector4[]), 5 },
{ typeof(global::XED.Manage.SubmeshData[]), 6 },
{ typeof(global::XED.Manage.TextureData[]), 7 },
{ typeof(global::XED.Manage.ThumbnailData[]), 8 },
{ typeof(string[][]), 9 },
{ typeof(global::XED.Manage.MaterialPropertyData), 10 },
{ typeof(global::XED.Manage.ModelData), 11 },
{ typeof(global::XED.Manage.SaveData), 12 },
{ typeof(global::XED.Manage.SavedModelData), 13 },
{ typeof(global::XED.Manage.SerializableMesh), 14 },
{ typeof(global::XED.Manage.SerializableQuaternion), 15 },
{ typeof(global::XED.Manage.SerializableVector2), 16 },
{ typeof(global::XED.Manage.SerializableVector3), 17 },
{ typeof(global::XED.Manage.SerializableVector4), 18 },
{ typeof(global::XED.Manage.SubmeshData), 19 },
{ typeof(global::XED.Manage.TextureData), 20 },
{ typeof(global::XED.Manage.ThumbnailData), 21 },
{ typeof(global::XED.Manage.TransformData), 22 },
};
}
internal static object GetFormatter(global::System.Type t)
{
int key;
if (!lookup.TryGetValue(t, out key))
{
return null;
}
switch (key)
{
case 0: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.MaterialPropertyData>();
case 1: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.ModelData>();
case 2: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.SavedModelData>();
case 3: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.SerializableVector2>();
case 4: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.SerializableVector3>();
case 5: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.SerializableVector4>();
case 6: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.SubmeshData>();
case 7: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.TextureData>();
case 8: return new global::MessagePack.Formatters.ArrayFormatter<global::XED.Manage.ThumbnailData>();
case 9: return new global::MessagePack.Formatters.ArrayFormatter<string[]>();
case 10: return new MessagePack.Formatters.XED.Manage.MaterialPropertyDataFormatter();
case 11: return new MessagePack.Formatters.XED.Manage.ModelDataFormatter();
case 12: return new MessagePack.Formatters.XED.Manage.SaveDataFormatter();
case 13: return new MessagePack.Formatters.XED.Manage.SavedModelDataFormatter();
case 14: return new MessagePack.Formatters.XED.Manage.SerializableMeshFormatter();
case 15: return new MessagePack.Formatters.XED.Manage.SerializableQuaternionFormatter();
case 16: return new MessagePack.Formatters.XED.Manage.SerializableVector2Formatter();
case 17: return new MessagePack.Formatters.XED.Manage.SerializableVector3Formatter();
case 18: return new MessagePack.Formatters.XED.Manage.SerializableVector4Formatter();
case 19: return new MessagePack.Formatters.XED.Manage.SubmeshDataFormatter();
case 20: return new MessagePack.Formatters.XED.Manage.TextureDataFormatter();
case 21: return new MessagePack.Formatters.XED.Manage.ThumbnailDataFormatter();
case 22: return new MessagePack.Formatters.XED.Manage.TransformDataFormatter();
default: return null;
}
}
}
}
#pragma warning restore 168
#pragma warning restore 414
#pragma warning restore 618
#pragma warning restore 612
#pragma warning restore SA1312 // Variable names should begin with lower-case letter
#pragma warning restore SA1649 // File name should match first type name
// <auto-generated>
// THIS (.cs) FILE IS GENERATED BY MPC(MessagePack-CSharp). DO NOT CHANGE IT.
// </auto-generated>
#pragma warning disable 618
#pragma warning disable 612
#pragma warning disable 414
#pragma warning disable 168
#pragma warning disable CS1591 // document public APIs
#pragma warning disable SA1129 // Do not use default value type constructor
#pragma warning disable SA1309 // Field names should not begin with underscore
#pragma warning disable SA1312 // Variable names should begin with lower-case letter
#pragma warning disable SA1403 // File may only contain a single namespace
#pragma warning disable SA1649 // File name should match first type name
namespace MessagePack.Formatters.XED.Manage
{
public sealed class MaterialPropertyDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.MaterialPropertyData>
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.MaterialPropertyData value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
writer.WriteNil();
return;
}
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(11);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<float[]>(formatterResolver).Serialize(ref writer, value.baseColor, options);
writer.Write(value.metallic);
writer.Write(value.smoothness);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<float[]>(formatterResolver).Serialize(ref writer, value.emissionColor, options);
writer.Write(value.renderMode);
writer.Write(value.surfaceType);
writer.Write(value.blendMode);
writer.Write(value.occlusionStrength);
writer.Write(value.normalScale);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string[]>(formatterResolver).Serialize(ref writer, value.texTypes, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string[]>(formatterResolver).Serialize(ref writer, value.texUIDs, options);
}
public global::XED.Manage.MaterialPropertyData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
return null;
}
options.Security.DepthStep(ref reader);
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
var ____result = new global::XED.Manage.MaterialPropertyData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.baseColor = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<float[]>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
____result.metallic = reader.ReadSingle();
break;
case 2:
____result.smoothness = reader.ReadSingle();
break;
case 3:
____result.emissionColor = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<float[]>(formatterResolver).Deserialize(ref reader, options);
break;
case 4:
____result.renderMode = reader.ReadInt32();
break;
case 5:
____result.surfaceType = reader.ReadInt32();
break;
case 6:
____result.blendMode = reader.ReadInt32();
break;
case 7:
____result.occlusionStrength = reader.ReadSingle();
break;
case 8:
____result.normalScale = reader.ReadSingle();
break;
case 9:
____result.texTypes = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string[]>(formatterResolver).Deserialize(ref reader, options);
break;
case 10:
____result.texUIDs = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string[]>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
public sealed class ModelDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.ModelData>
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.ModelData value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
writer.WriteNil();
return;
}
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(6);
writer.Write(value.id);
writer.Write(value.parentId);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.modelComponentName, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.TransformData>(formatterResolver).Serialize(ref writer, value.transformData, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableMesh>(formatterResolver).Serialize(ref writer, value.mesh, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.MaterialPropertyData[]>(formatterResolver).Serialize(ref writer, value.materialProperties, options);
}
public global::XED.Manage.ModelData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
return null;
}
options.Security.DepthStep(ref reader);
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
var ____result = new global::XED.Manage.ModelData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.id = reader.ReadInt32();
break;
case 1:
____result.parentId = reader.ReadInt32();
break;
case 2:
____result.modelComponentName = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
break;
case 3:
____result.transformData = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.TransformData>(formatterResolver).Deserialize(ref reader, options);
break;
case 4:
____result.mesh = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableMesh>(formatterResolver).Deserialize(ref reader, options);
break;
case 5:
____result.materialProperties = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.MaterialPropertyData[]>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
public sealed class SaveDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SaveData>
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SaveData value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
writer.WriteNil();
return;
}
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(3);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SavedModelData[]>(formatterResolver).Serialize(ref writer, value.modelDatas, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.TextureData[]>(formatterResolver).Serialize(ref writer, value.textureDatas, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.ThumbnailData[]>(formatterResolver).Serialize(ref writer, value.thumbnailDatas, options);
}
public global::XED.Manage.SaveData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
return null;
}
options.Security.DepthStep(ref reader);
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
var ____result = new global::XED.Manage.SaveData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.modelDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SavedModelData[]>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
____result.textureDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.TextureData[]>(formatterResolver).Deserialize(ref reader, options);
break;
case 2:
____result.thumbnailDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.ThumbnailData[]>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
public sealed class SavedModelDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SavedModelData>
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SavedModelData value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
writer.WriteNil();
return;
}
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(2);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string[][]>(formatterResolver).Serialize(ref writer, value.attributes, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.ModelData[]>(formatterResolver).Serialize(ref writer, value.models, options);
}
public global::XED.Manage.SavedModelData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
return null;
}
options.Security.DepthStep(ref reader);
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
var ____result = new global::XED.Manage.SavedModelData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.attributes = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string[][]>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
____result.models = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.ModelData[]>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
public sealed class SerializableMeshFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SerializableMesh>
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SerializableMesh value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
writer.WriteNil();
return;
}
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(5);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3[]>(formatterResolver).Serialize(ref writer, value.vertices, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3[]>(formatterResolver).Serialize(ref writer, value.normals, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector4[]>(formatterResolver).Serialize(ref writer, value.tangents, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector2[]>(formatterResolver).Serialize(ref writer, value.uv, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SubmeshData[]>(formatterResolver).Serialize(ref writer, value.submeshes, options);
}
public global::XED.Manage.SerializableMesh Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
return null;
}
options.Security.DepthStep(ref reader);
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
var ____result = new global::XED.Manage.SerializableMesh();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.vertices = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3[]>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
____result.normals = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3[]>(formatterResolver).Deserialize(ref reader, options);
break;
case 2:
____result.tangents = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector4[]>(formatterResolver).Deserialize(ref reader, options);
break;
case 3:
____result.uv = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector2[]>(formatterResolver).Deserialize(ref reader, options);
break;
case 4:
____result.submeshes = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SubmeshData[]>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
public sealed class SerializableQuaternionFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SerializableQuaternion>
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SerializableQuaternion value, global::MessagePack.MessagePackSerializerOptions options)
{
writer.WriteArrayHeader(4);
writer.Write(value.x);
writer.Write(value.y);
writer.Write(value.z);
writer.Write(value.w);
}
public global::XED.Manage.SerializableQuaternion Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
var ____result = new global::XED.Manage.SerializableQuaternion();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.x = reader.ReadSingle();
break;
case 1:
____result.y = reader.ReadSingle();
break;
case 2:
____result.z = reader.ReadSingle();
break;
case 3:
____result.w = reader.ReadSingle();
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
public sealed class SerializableVector2Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SerializableVector2>
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SerializableVector2 value, global::MessagePack.MessagePackSerializerOptions options)
{
writer.WriteArrayHeader(2);
writer.Write(value.x);
writer.Write(value.y);
}
public global::XED.Manage.SerializableVector2 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
var __x__ = default(float);
var __y__ = default(float);
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
__x__ = reader.ReadSingle();
break;
case 1:
__y__ = reader.ReadSingle();
break;
default:
reader.Skip();
break;
}
}
var ____result = new global::XED.Manage.SerializableVector2(__x__, __y__);
reader.Depth--;
return ____result;
}
}
public sealed class SerializableVector3Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SerializableVector3>
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SerializableVector3 value, global::MessagePack.MessagePackSerializerOptions options)
{
writer.WriteArrayHeader(3);
writer.Write(value.x);
writer.Write(value.y);
writer.Write(value.z);
}
public global::XED.Manage.SerializableVector3 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
var __x__ = default(float);
var __y__ = default(float);
var __z__ = default(float);
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
__x__ = reader.ReadSingle();
break;
case 1:
__y__ = reader.ReadSingle();
break;
case 2:
__z__ = reader.ReadSingle();
break;
default:
reader.Skip();
break;
}
}
var ____result = new global::XED.Manage.SerializableVector3(__x__, __y__, __z__);
reader.Depth--;
return ____result;
}
}
public sealed class SerializableVector4Formatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SerializableVector4>
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SerializableVector4 value, global::MessagePack.MessagePackSerializerOptions options)
{
writer.WriteArrayHeader(4);
writer.Write(value.x);
writer.Write(value.y);
writer.Write(value.z);
writer.Write(value.w);
}
public global::XED.Manage.SerializableVector4 Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
throw new global::System.InvalidOperationException("typecode is null, struct not supported");
}
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
var __x__ = default(float);
var __y__ = default(float);
var __z__ = default(float);
var __w__ = default(float);
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
__x__ = reader.ReadSingle();
break;
case 1:
__y__ = reader.ReadSingle();
break;
case 2:
__z__ = reader.ReadSingle();
break;
case 3:
__w__ = reader.ReadSingle();
break;
default:
reader.Skip();
break;
}
}
var ____result = new global::XED.Manage.SerializableVector4(__x__, __y__, __z__, __w__);
reader.Depth--;
return ____result;
}
}
public sealed class SubmeshDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.SubmeshData>
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.SubmeshData value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
writer.WriteNil();
return;
}
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(2);
writer.Write(value.materialIndex);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<int[]>(formatterResolver).Serialize(ref writer, value.triangles, options);
}
public global::XED.Manage.SubmeshData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
return null;
}
options.Security.DepthStep(ref reader);
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
var ____result = new global::XED.Manage.SubmeshData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.materialIndex = reader.ReadInt32();
break;
case 1:
____result.triangles = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<int[]>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
public sealed class TextureDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.TextureData>
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.TextureData value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
writer.WriteNil();
return;
}
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(3);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.name, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Serialize(ref writer, value.uid, options);
writer.Write(value.data);
}
public global::XED.Manage.TextureData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
return null;
}
options.Security.DepthStep(ref reader);
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
var __name__ = default(string);
var __uid__ = default(string);
var __data__ = default(byte[]);
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
__name__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
__uid__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<string>(formatterResolver).Deserialize(ref reader, options);
break;
case 2:
__data__ = global::MessagePack.Internal.CodeGenHelpers.GetArrayFromNullableSequence(reader.ReadBytes());
break;
default:
reader.Skip();
break;
}
}
var ____result = new global::XED.Manage.TextureData(__name__, __uid__, __data__);
reader.Depth--;
return ____result;
}
}
public sealed class ThumbnailDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.ThumbnailData>
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.ThumbnailData value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
writer.WriteNil();
return;
}
writer.WriteArrayHeader(1);
writer.Write(value.data);
}
public global::XED.Manage.ThumbnailData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
return null;
}
options.Security.DepthStep(ref reader);
var length = reader.ReadArrayHeader();
var __data__ = default(byte[]);
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
__data__ = global::MessagePack.Internal.CodeGenHelpers.GetArrayFromNullableSequence(reader.ReadBytes());
break;
default:
reader.Skip();
break;
}
}
var ____result = new global::XED.Manage.ThumbnailData(__data__);
reader.Depth--;
return ____result;
}
}
public sealed class TransformDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter<global::XED.Manage.TransformData>
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Manage.TransformData value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
writer.WriteNil();
return;
}
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(3);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3>(formatterResolver).Serialize(ref writer, value.position, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableQuaternion>(formatterResolver).Serialize(ref writer, value.rotation, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3>(formatterResolver).Serialize(ref writer, value.scale, options);
}
public global::XED.Manage.TransformData Deserialize(ref global::MessagePack.MessagePackReader reader, global::MessagePack.MessagePackSerializerOptions options)
{
if (reader.TryReadNil())
{
return null;
}
options.Security.DepthStep(ref reader);
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
var length = reader.ReadArrayHeader();
var ____result = new global::XED.Manage.TransformData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.position = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3>(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
____result.rotation = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableQuaternion>(formatterResolver).Deserialize(ref reader, options);
break;
case 2:
____result.scale = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify<global::XED.Manage.SerializableVector3>(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
}
#pragma warning restore 168
#pragma warning restore 414
#pragma warning restore 618
#pragma warning restore 612
#pragma warning restore SA1129 // Do not use default value type constructor
#pragma warning restore SA1309 // Field names should not begin with underscore
#pragma warning restore SA1312 // Variable names should begin with lower-case letter
#pragma warning restore SA1403 // File may only contain a single namespace
#pragma warning restore SA1649 // File name should match first type name