From 539d2515b4b1756699ba1a80006afd3f628c0309 Mon Sep 17 00:00:00 2001 From: vis2k Date: Wed, 2 Jan 2019 13:38:39 +0100 Subject: [PATCH] Weaver.ResolveField moved to Resolvers --- Mirror/Weaver/Resolvers.cs | 12 ++++++++++++ Mirror/Weaver/Weaver.cs | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Mirror/Weaver/Resolvers.cs b/Mirror/Weaver/Resolvers.cs index 8ffaaead8..d067b189f 100644 --- a/Mirror/Weaver/Resolvers.cs +++ b/Mirror/Weaver/Resolvers.cs @@ -125,5 +125,17 @@ public static GenericInstanceMethod ResolveMethodGeneric(TypeReference t, Assemb Weaver.fail = true; return null; } + + public static FieldReference ResolveField(TypeReference tr, AssemblyDefinition scriptDef, string name) + { + foreach (FieldDefinition fd in tr.Resolve().Fields) + { + if (fd.Name == name) + { + return scriptDef.MainModule.ImportReference(fd); + } + } + return null; + } } } \ No newline at end of file diff --git a/Mirror/Weaver/Weaver.cs b/Mirror/Weaver/Weaver.cs index 3772f7feb..482b8f650 100644 --- a/Mirror/Weaver/Weaver.cs +++ b/Mirror/Weaver/Weaver.cs @@ -1034,18 +1034,6 @@ static bool ProcessNetworkBehaviourType(TypeDefinition td) return false; } - public static FieldReference ResolveField(TypeReference t, string name) - { - foreach (FieldDefinition fd in t.Resolve().Fields) - { - if (fd.Name == name) - { - return scriptDef.MainModule.ImportReference(fd); - } - } - return null; - } - public static MethodReference ResolveProperty(TypeReference t, string name) { foreach (var fd in t.Resolve().Properties)