//
// THIS (.cs) FILE IS GENERATED BY MPC(MessagePack-CSharp). DO NOT CHANGE IT.
//
#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 GetFormatter()
{
return FormatterCache.Formatter;
}
private static class FormatterCache
{
internal static readonly global::MessagePack.Formatters.IMessagePackFormatter Formatter;
static FormatterCache()
{
var f = GeneratedResolverGetFormatterHelper.GetFormatter(typeof(T));
if (f != null)
{
Formatter = (global::MessagePack.Formatters.IMessagePackFormatter)f;
}
}
}
}
internal static class GeneratedResolverGetFormatterHelper
{
private static readonly global::System.Collections.Generic.Dictionary lookup;
static GeneratedResolverGetFormatterHelper()
{
lookup = new global::System.Collections.Generic.Dictionary(19)
{
{ typeof(global::XED.Asset.MaterialPropertyData[]), 0 },
{ typeof(global::XED.Asset.ModelData[]), 1 },
{ typeof(global::XED.Asset.SavedModelData[]), 2 },
{ typeof(global::XED.Asset.SerializableVector2[]), 3 },
{ typeof(global::XED.Asset.SerializableVector3[]), 4 },
{ typeof(global::XED.Asset.SubmeshData[]), 5 },
{ typeof(global::XED.Asset.TextureData[]), 6 },
{ typeof(string[][]), 7 },
{ typeof(global::XED.Asset.MaterialPropertyData), 8 },
{ typeof(global::XED.Asset.ModelData), 9 },
{ typeof(global::XED.Asset.SaveData), 10 },
{ typeof(global::XED.Asset.SavedModelData), 11 },
{ typeof(global::XED.Asset.SerializableMesh), 12 },
{ typeof(global::XED.Asset.SerializableQuaternion), 13 },
{ typeof(global::XED.Asset.SerializableVector2), 14 },
{ typeof(global::XED.Asset.SerializableVector3), 15 },
{ typeof(global::XED.Asset.SubmeshData), 16 },
{ typeof(global::XED.Asset.TextureData), 17 },
{ typeof(global::XED.Asset.TransformData), 18 },
};
}
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();
case 1: return new global::MessagePack.Formatters.ArrayFormatter();
case 2: return new global::MessagePack.Formatters.ArrayFormatter();
case 3: return new global::MessagePack.Formatters.ArrayFormatter();
case 4: return new global::MessagePack.Formatters.ArrayFormatter();
case 5: return new global::MessagePack.Formatters.ArrayFormatter();
case 6: return new global::MessagePack.Formatters.ArrayFormatter();
case 7: return new global::MessagePack.Formatters.ArrayFormatter();
case 8: return new MessagePack.Formatters.XED.Asset.MaterialPropertyDataFormatter();
case 9: return new MessagePack.Formatters.XED.Asset.ModelDataFormatter();
case 10: return new MessagePack.Formatters.XED.Asset.SaveDataFormatter();
case 11: return new MessagePack.Formatters.XED.Asset.SavedModelDataFormatter();
case 12: return new MessagePack.Formatters.XED.Asset.SerializableMeshFormatter();
case 13: return new MessagePack.Formatters.XED.Asset.SerializableQuaternionFormatter();
case 14: return new MessagePack.Formatters.XED.Asset.SerializableVector2Formatter();
case 15: return new MessagePack.Formatters.XED.Asset.SerializableVector3Formatter();
case 16: return new MessagePack.Formatters.XED.Asset.SubmeshDataFormatter();
case 17: return new MessagePack.Formatters.XED.Asset.TextureDataFormatter();
case 18: return new MessagePack.Formatters.XED.Asset.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
//
// THIS (.cs) FILE IS GENERATED BY MPC(MessagePack-CSharp). DO NOT CHANGE IT.
//
#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.Asset
{
public sealed class MaterialPropertyDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.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(formatterResolver).Serialize(ref writer, value.baseColor, options);
writer.Write(value.metallic);
writer.Write(value.smoothness);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(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(formatterResolver).Serialize(ref writer, value.texTypes, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.texUIDs, options);
}
public global::XED.Asset.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.Asset.MaterialPropertyData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.baseColor = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(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(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(formatterResolver).Deserialize(ref reader, options);
break;
case 10:
____result.texUIDs = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
public sealed class ModelDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.ModelData value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
writer.WriteNil();
return;
}
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(3);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.transformData, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.mesh, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.materialProperties, options);
}
public global::XED.Asset.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.Asset.ModelData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.transformData = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
____result.mesh = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
case 2:
____result.materialProperties = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
public sealed class SaveDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.SaveData value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
writer.WriteNil();
return;
}
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(2);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.modelDatas, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.textureDatas, options);
}
public global::XED.Asset.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.Asset.SaveData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.modelDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
____result.textureDatas = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
public sealed class SavedModelDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.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(formatterResolver).Serialize(ref writer, value.attributes, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.models, options);
}
public global::XED.Asset.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.Asset.SavedModelData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.attributes = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
____result.models = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
public sealed class SerializableMeshFormatter : global::MessagePack.Formatters.IMessagePackFormatter
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.SerializableMesh value, global::MessagePack.MessagePackSerializerOptions options)
{
if (value == null)
{
writer.WriteNil();
return;
}
global::MessagePack.IFormatterResolver formatterResolver = options.Resolver;
writer.WriteArrayHeader(4);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.vertices, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.normals, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.uv, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.submeshes, options);
}
public global::XED.Asset.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.Asset.SerializableMesh();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.vertices = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
____result.normals = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
case 2:
____result.uv = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
case 3:
____result.submeshes = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
public sealed class SerializableQuaternionFormatter : global::MessagePack.Formatters.IMessagePackFormatter
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.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.Asset.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.Asset.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
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.SerializableVector2 value, global::MessagePack.MessagePackSerializerOptions options)
{
writer.WriteArrayHeader(2);
writer.Write(value.x);
writer.Write(value.y);
}
public global::XED.Asset.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.Asset.SerializableVector2(__x__, __y__);
reader.Depth--;
return ____result;
}
}
public sealed class SerializableVector3Formatter : global::MessagePack.Formatters.IMessagePackFormatter
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.SerializableVector3 value, global::MessagePack.MessagePackSerializerOptions options)
{
writer.WriteArrayHeader(3);
writer.Write(value.x);
writer.Write(value.y);
writer.Write(value.z);
}
public global::XED.Asset.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.Asset.SerializableVector3(__x__, __y__, __z__);
reader.Depth--;
return ____result;
}
}
public sealed class SubmeshDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.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(formatterResolver).Serialize(ref writer, value.triangles, options);
}
public global::XED.Asset.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.Asset.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(formatterResolver).Deserialize(ref reader, options);
break;
default:
reader.Skip();
break;
}
}
reader.Depth--;
return ____result;
}
}
public sealed class TextureDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.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(formatterResolver).Serialize(ref writer, value.name, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.uid, options);
writer.Write(value.data);
}
public global::XED.Asset.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(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
__uid__ = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(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.Asset.TextureData(__name__, __uid__, __data__);
reader.Depth--;
return ____result;
}
}
public sealed class TransformDataFormatter : global::MessagePack.Formatters.IMessagePackFormatter
{
public void Serialize(ref global::MessagePack.MessagePackWriter writer, global::XED.Asset.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(formatterResolver).Serialize(ref writer, value.position, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.rotation, options);
global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Serialize(ref writer, value.scale, options);
}
public global::XED.Asset.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.Asset.TransformData();
for (int i = 0; i < length; i++)
{
switch (i)
{
case 0:
____result.position = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
case 1:
____result.rotation = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(formatterResolver).Deserialize(ref reader, options);
break;
case 2:
____result.scale = global::MessagePack.FormatterResolverExtensions.GetFormatterWithVerify(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