Simplify namespace

This commit is contained in:
Paul Pacheco 2020-09-21 17:00:57 -05:00
parent d123e03915
commit f77186e1d1

View File

@ -18,7 +18,7 @@ public static List<FieldDefinition> FindSyncObjectsFields(TypeDefinition td)
foreach (FieldDefinition fd in td.Fields) foreach (FieldDefinition fd in td.Fields)
{ {
if (fd.FieldType.Resolve().ImplementsInterface<Mirror.SyncObject>()) if (fd.FieldType.Resolve().ImplementsInterface<SyncObject>())
{ {
if (fd.IsStatic) if (fd.IsStatic)
{ {
@ -87,7 +87,7 @@ static bool GenerateSerialization(string methodName, TypeDefinition td, TypeRefe
MethodAttributes.HideBySig, MethodAttributes.HideBySig,
WeaverTypes.Import(typeof(void))); WeaverTypes.Import(typeof(void)));
serializeFunc.Parameters.Add(new ParameterDefinition("writer", ParameterAttributes.None, WeaverTypes.Import<Mirror.NetworkWriter>())); serializeFunc.Parameters.Add(new ParameterDefinition("writer", ParameterAttributes.None, WeaverTypes.Import<NetworkWriter>()));
serializeFunc.Parameters.Add(new ParameterDefinition("item", ParameterAttributes.None, itemType)); serializeFunc.Parameters.Add(new ParameterDefinition("item", ParameterAttributes.None, itemType));
ILProcessor worker = serializeFunc.Body.GetILProcessor(); ILProcessor worker = serializeFunc.Body.GetILProcessor();
@ -130,7 +130,7 @@ static bool GenerateDeserialization(string methodName, TypeDefinition td, TypeRe
MethodAttributes.HideBySig, MethodAttributes.HideBySig,
itemType); itemType);
deserializeFunction.Parameters.Add(new ParameterDefinition("reader", ParameterAttributes.None, WeaverTypes.Import<Mirror.NetworkReader>())); deserializeFunction.Parameters.Add(new ParameterDefinition("reader", ParameterAttributes.None, WeaverTypes.Import<NetworkReader>()));
ILProcessor worker = deserializeFunction.Body.GetILProcessor(); ILProcessor worker = deserializeFunction.Body.GetILProcessor();