Explorar el Código

增加MonoPool,简化Entity实现

tanghai hace 4 años
padre
commit
294fe1cee4
Se han modificado 23 ficheros con 484 adiciones y 790 borrados
  1. 2 2
      Unity/Assets/Mono/Core/HashSetComponent.cs
  2. 2 2
      Unity/Assets/Mono/Core/ListComponent.cs
  3. 13 10
      Unity/Assets/Mono/Core/MonoPool.cs
  4. 1 1
      Unity/Assets/Mono/Core/MonoPool.cs.meta
  5. 2 3
      Unity/Assets/Mono/ILRuntime/Generate/CLRBindings.cs
  6. 131 0
      Unity/Assets/Mono/ILRuntime/Generate/ET_MonoPool_Binding.cs
  7. 1 1
      Unity/Assets/Mono/ILRuntime/Generate/ET_MonoPool_Binding.cs.meta
  8. 0 89
      Unity/Assets/Mono/ILRuntime/Generate/System_Activator_Binding.cs
  9. 0 13
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding.cs
  10. 174 0
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Type_Queue_1_ILTypeInstance_B.cs
  11. 1 1
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Type_Queue_1_ILTypeInstance_B.cs.meta
  12. 0 124
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Queue_1_Dictionary_2_Int64_ILTypeInstance_.cs
  13. 0 11
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Queue_1_Dictionary_2_Int64_ILTypeInstance_.cs.meta
  14. 0 124
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Queue_1_Dictionary_2_Type_ILTypeInstance_B.cs
  15. 0 124
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Queue_1_HashSet_1_ILTypeInstance_Binding.cs
  16. 20 38
      Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Queue_1_ILTypeInstance_Binding.cs
  17. 1 1
      Unity/Codes/Model/Core/Entity/Game.cs
  18. 14 26
      Unity/Codes/Model/Core/Object/Entity.cs
  19. 20 98
      Unity/Codes/Model/Core/Object/ObjectPool.cs
  20. 0 29
      Unity/Codes/Model/Core/Pool.cs
  21. 10 0
      Unity/Codes/Model/Core/PoolHelper.cs
  22. 12 13
      Unity/Unity.Mono.csproj
  23. 80 80
      Unity/Unity.ThirdParty.csproj

+ 2 - 2
Unity/Assets/Mono/Core/HashSetComponent.cs

@@ -7,13 +7,13 @@ namespace ET
     {
         public static HashSetComponent<T> Create()
         {
-            return Pool.Instance.Get(typeof (HashSetComponent<T>)) as HashSetComponent<T>;
+            return MonoPool.Instance.Fetch(typeof (HashSetComponent<T>)) as HashSetComponent<T>;
         }
 
         public void Dispose()
         {
             this.Clear();
-            Pool.Instance.Recycle(this);
+            MonoPool.Instance.Recycle(this);
         }
     }
 }

+ 2 - 2
Unity/Assets/Mono/Core/ListComponent.cs

@@ -7,13 +7,13 @@ namespace ET
     {
         public static ListComponent<T> Create()
         {
-            return Pool.Instance.Get(typeof (ListComponent<T>)) as ListComponent<T>;
+            return MonoPool.Instance.Fetch(typeof (ListComponent<T>)) as ListComponent<T>;
         }
 
         public void Dispose()
         {
             this.Clear();
-            Pool.Instance.Recycle(this);
+            MonoPool.Instance.Recycle(this);
         }
     }
 }

+ 13 - 10
Unity/Assets/Mono/Core/Pool.cs → Unity/Assets/Mono/Core/MonoPool.cs

@@ -3,31 +3,29 @@ using System.Collections.Generic;
 
 namespace ET
 {
-    public class Pool
+    public class MonoPool: IDisposable
     {
         private readonly Dictionary<Type, Queue<object>> pool = new Dictionary<Type, Queue<object>>();
         
-        public static Pool Instance = new Pool();
+        public static MonoPool Instance = new MonoPool();
         
-        private Pool()
+        private MonoPool()
         {
         }
 
-        public object Get(Type type)
+        public object Fetch(Type type)
         {
             Queue<object> queue = null;
             if (!pool.TryGetValue(type, out queue))
             {
-                queue = new Queue<object>();
-                pool.Add(type, queue);
+                return Activator.CreateInstance(type);
             }
 
-            if (queue.Count > 0)
+            if (queue.Count == 0)
             {
-                return queue.Dequeue();
+                return Activator.CreateInstance(type);
             }
-
-            return Activator.CreateInstance(type);
+            return queue.Dequeue();
         }
 
         public void Recycle(object obj)
@@ -41,5 +39,10 @@ namespace ET
             }
             queue.Enqueue(obj);
         }
+
+        public void Dispose()
+        {
+            this.pool.Clear();
+        }
     }
 }

+ 1 - 1
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Queue_1_Dictionary_2_Type_ILTypeInstance_B.cs.meta → Unity/Assets/Mono/Core/MonoPool.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 74a51d0d63197f74c82aae51b1f99d60
+guid: 879f984db902b2a45a08c70214df0a31
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 2 - 3
Unity/Assets/Mono/ILRuntime/Generate/CLRBindings.cs

@@ -118,6 +118,7 @@ namespace ILRuntime.Runtime.Generated
             System_Collections_Generic_List_1_Action_Binding.Register(app);
             System_Collections_Generic_List_1_Action_Binding_Enumerator_Binding.Register(app);
             System_Action_Binding.Register(app);
+            ET_MonoPool_Binding.Register(app);
             System_Collections_Generic_HashSet_1_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_HashSet_1_ILTypeInstance_Binding_Enumerator_Binding.Register(app);
             System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding.Register(app);
@@ -152,6 +153,7 @@ namespace ILRuntime.Runtime.Generated
             System_Collections_Generic_Dictionary_2_Type_UnOrderMultiMap_2_Type_Object_Binding.Register(app);
             System_DateTime_Binding.Register(app);
             ET_JsonHelper_Binding.Register(app);
+            System_Collections_Generic_Dictionary_2_Type_Queue_1_ILTypeInstance_Binding.Register(app);
             System_Collections_Generic_Queue_1_ILTypeInstance_Binding.Register(app);
             ProtoBuf_Meta_RuntimeTypeModel_Binding.Register(app);
             ProtoBuf_Meta_TypeModel_Binding.Register(app);
@@ -227,9 +229,6 @@ namespace ILRuntime.Runtime.Generated
             ET_ETTaskHelper_Binding.Register(app);
             ET_ListComponent_1_String_Binding.Register(app);
             ET_ComponentView_Binding.Register(app);
-            System_Collections_Generic_Queue_1_HashSet_1_ILTypeInstance_Binding.Register(app);
-            System_Collections_Generic_Queue_1_Dictionary_2_Type_ILTypeInstance_Binding.Register(app);
-            System_Collections_Generic_Queue_1_Dictionary_2_Int64_ILTypeInstance_Binding.Register(app);
         }
 
         /// <summary>

+ 131 - 0
Unity/Assets/Mono/ILRuntime/Generate/ET_MonoPool_Binding.cs

@@ -0,0 +1,131 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class ET_MonoPool_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            FieldInfo field;
+            Type[] args;
+            Type type = typeof(ET.MonoPool);
+            args = new Type[]{};
+            method = type.GetMethod("Dispose", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Dispose_0);
+            args = new Type[]{typeof(System.Object)};
+            method = type.GetMethod("Recycle", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Recycle_1);
+            args = new Type[]{typeof(System.Type)};
+            method = type.GetMethod("Fetch", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Fetch_2);
+
+            field = type.GetField("Instance", flag);
+            app.RegisterCLRFieldGetter(field, get_Instance_0);
+            app.RegisterCLRFieldSetter(field, set_Instance_0);
+            app.RegisterCLRFieldBinding(field, CopyToStack_Instance_0, AssignFromStack_Instance_0);
+
+
+        }
+
+
+        static StackObject* Dispose_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* ptr_of_this_method;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            ET.MonoPool instance_of_this_method = (ET.MonoPool)typeof(ET.MonoPool).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Dispose();
+
+            return __ret;
+        }
+
+        static StackObject* Recycle_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* ptr_of_this_method;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Object @obj = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            ET.MonoPool instance_of_this_method = (ET.MonoPool)typeof(ET.MonoPool).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Recycle(@obj);
+
+            return __ret;
+        }
+
+        static StackObject* Fetch_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* ptr_of_this_method;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Type @type = (System.Type)typeof(System.Type).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            ET.MonoPool instance_of_this_method = (ET.MonoPool)typeof(ET.MonoPool).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            var result_of_this_method = instance_of_this_method.Fetch(@type);
+
+            object obj_result_of_this_method = result_of_this_method;
+            if(obj_result_of_this_method is CrossBindingAdaptorType)
+            {    
+                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance, true);
+            }
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true);
+        }
+
+
+        static object get_Instance_0(ref object o)
+        {
+            return ET.MonoPool.Instance;
+        }
+
+        static StackObject* CopyToStack_Instance_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
+        {
+            var result_of_this_method = ET.MonoPool.Instance;
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+        static void set_Instance_0(ref object o, object v)
+        {
+            ET.MonoPool.Instance = (ET.MonoPool)v;
+        }
+
+        static StackObject* AssignFromStack_Instance_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            ET.MonoPool @Instance = (ET.MonoPool)typeof(ET.MonoPool).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            ET.MonoPool.Instance = @Instance;
+            return ptr_of_this_method;
+        }
+
+
+
+    }
+}

+ 1 - 1
Unity/Assets/Mono/Core/Pool.cs.meta → Unity/Assets/Mono/ILRuntime/Generate/ET_MonoPool_Binding.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 27e312875644fc749813dc9c1f8b21e2
+guid: 9c4c311a40bd4804c87212f89df8375f
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 0 - 89
Unity/Assets/Mono/ILRuntime/Generate/System_Activator_Binding.cs

@@ -25,62 +25,6 @@ namespace ILRuntime.Runtime.Generated
             args = new Type[]{typeof(System.Type)};
             method = type.GetMethod("CreateInstance", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, CreateInstance_0);
-            Dictionary<string, List<MethodInfo>> genericMethods = new Dictionary<string, List<MethodInfo>>();
-            List<MethodInfo> lst = null;                    
-            foreach(var m in type.GetMethods())
-            {
-                if(m.IsGenericMethodDefinition)
-                {
-                    if (!genericMethods.TryGetValue(m.Name, out lst))
-                    {
-                        lst = new List<MethodInfo>();
-                        genericMethods[m.Name] = lst;
-                    }
-                    lst.Add(m);
-                }
-            }
-            args = new Type[]{typeof(System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>)};
-            if (genericMethods.TryGetValue("CreateInstance", out lst))
-            {
-                foreach(var m in lst)
-                {
-                    if(m.MatchGenericParameters(args, typeof(System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>)))
-                    {
-                        method = m.MakeGenericMethod(args);
-                        app.RegisterCLRMethodRedirection(method, CreateInstance_1);
-
-                        break;
-                    }
-                }
-            }
-            args = new Type[]{typeof(System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>)};
-            if (genericMethods.TryGetValue("CreateInstance", out lst))
-            {
-                foreach(var m in lst)
-                {
-                    if(m.MatchGenericParameters(args, typeof(System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>)))
-                    {
-                        method = m.MakeGenericMethod(args);
-                        app.RegisterCLRMethodRedirection(method, CreateInstance_2);
-
-                        break;
-                    }
-                }
-            }
-            args = new Type[]{typeof(System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>)};
-            if (genericMethods.TryGetValue("CreateInstance", out lst))
-            {
-                foreach(var m in lst)
-                {
-                    if(m.MatchGenericParameters(args, typeof(System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>)))
-                    {
-                        method = m.MakeGenericMethod(args);
-                        app.RegisterCLRMethodRedirection(method, CreateInstance_3);
-
-                        break;
-                    }
-                }
-            }
 
 
         }
@@ -107,39 +51,6 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true);
         }
 
-        static StackObject* CreateInstance_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
-
-
-            var result_of_this_method = System.Activator.CreateInstance<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>>();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* CreateInstance_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
-
-
-            var result_of_this_method = System.Activator.CreateInstance<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>>();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* CreateInstance_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
-
-
-            var result_of_this_method = System.Activator.CreateInstance<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>>();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
 
 
     }

+ 0 - 13
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding.cs

@@ -47,9 +47,6 @@ namespace ILRuntime.Runtime.Generated
             method = type.GetMethod("ContainsKey", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, ContainsKey_7);
 
-            args = new Type[]{};
-            method = type.GetConstructor(flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Ctor_0);
 
         }
 
@@ -263,16 +260,6 @@ namespace ILRuntime.Runtime.Generated
         }
 
 
-        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
-
-            var result_of_this_method = new System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
 
     }
 }

+ 174 - 0
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Type_Queue_1_ILTypeInstance_B.cs

@@ -0,0 +1,174 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+using ILRuntime.CLR.TypeSystem;
+using ILRuntime.CLR.Method;
+using ILRuntime.Runtime.Enviorment;
+using ILRuntime.Runtime.Intepreter;
+using ILRuntime.Runtime.Stack;
+using ILRuntime.Reflection;
+using ILRuntime.CLR.Utils;
+
+namespace ILRuntime.Runtime.Generated
+{
+    unsafe class System_Collections_Generic_Dictionary_2_Type_Queue_1_ILTypeInstance_Binding
+    {
+        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
+        {
+            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+            MethodBase method;
+            Type[] args;
+            Type type = typeof(System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>>);
+            args = new Type[]{typeof(System.Type), typeof(System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>).MakeByRefType()};
+            method = type.GetMethod("TryGetValue", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, TryGetValue_0);
+            args = new Type[]{typeof(System.Type), typeof(System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>)};
+            method = type.GetMethod("Add", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Add_1);
+            args = new Type[]{};
+            method = type.GetMethod("Clear", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Clear_2);
+
+            args = new Type[]{};
+            method = type.GetConstructor(flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Ctor_0);
+
+        }
+
+
+        static StackObject* TryGetValue_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* ptr_of_this_method;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 3);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance> @value = (System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(__intp.RetriveObject(ptr_of_this_method, __mStack));
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Type @key = (System.Type)typeof(System.Type).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+
+            var result_of_this_method = instance_of_this_method.TryGetValue(@key, out @value);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            switch(ptr_of_this_method->ObjectType)
+            {
+                case ObjectTypes.StackObjectReference:
+                    {
+                        var ___dst = ILIntepreter.ResolveReference(ptr_of_this_method);
+                        object ___obj = @value;
+                        if (___dst->ObjectType >= ObjectTypes.Object)
+                        {
+                            if (___obj is CrossBindingAdaptorType)
+                                ___obj = ((CrossBindingAdaptorType)___obj).ILInstance;
+                            __mStack[___dst->Value] = ___obj;
+                        }
+                        else
+                        {
+                            ILIntepreter.UnboxObject(___dst, ___obj, __mStack, __domain);
+                        }
+                    }
+                    break;
+                case ObjectTypes.FieldReference:
+                    {
+                        var ___obj = __mStack[ptr_of_this_method->Value];
+                        if(___obj is ILTypeInstance)
+                        {
+                            ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = @value;
+                        }
+                        else
+                        {
+                            var ___type = __domain.GetType(___obj.GetType()) as CLRType;
+                            ___type.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, @value);
+                        }
+                    }
+                    break;
+                case ObjectTypes.StaticFieldReference:
+                    {
+                        var ___type = __domain.GetType(ptr_of_this_method->Value);
+                        if(___type is ILType)
+                        {
+                            ((ILType)___type).StaticInstance[ptr_of_this_method->ValueLow] = @value;
+                        }
+                        else
+                        {
+                            ((CLRType)___type).SetStaticFieldValue(ptr_of_this_method->ValueLow, @value);
+                        }
+                    }
+                    break;
+                 case ObjectTypes.ArrayReference:
+                    {
+                        var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>[];
+                        instance_of_arrayReference[ptr_of_this_method->ValueLow] = @value;
+                    }
+                    break;
+            }
+
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            __intp.Free(ptr_of_this_method);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            __intp.Free(ptr_of_this_method);
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method ? 1 : 0;
+            return __ret + 1;
+        }
+
+        static StackObject* Add_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* ptr_of_this_method;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 3);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance> @value = (System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
+            System.Type @key = (System.Type)typeof(System.Type).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
+            System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Add(@key, @value);
+
+            return __ret;
+        }
+
+        static StackObject* Clear_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* ptr_of_this_method;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            __intp.Free(ptr_of_this_method);
+
+            instance_of_this_method.Clear();
+
+            return __ret;
+        }
+
+
+        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        {
+            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
+            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
+
+            var result_of_this_method = new System.Collections.Generic.Dictionary<System.Type, System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>>();
+
+            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
+        }
+
+
+    }
+}

+ 1 - 1
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Queue_1_HashSet_1_ILTypeInstance_Binding.cs.meta → Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Dictionary_2_Type_Queue_1_ILTypeInstance_B.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 01f3211841ab4b241b7d7e70b56e9a63
+guid: ae7bc42f3eb70ee48b5324f7aa8702e7
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 0 - 124
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Queue_1_Dictionary_2_Int64_ILTypeInstance_.cs

@@ -1,124 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-using ILRuntime.CLR.TypeSystem;
-using ILRuntime.CLR.Method;
-using ILRuntime.Runtime.Enviorment;
-using ILRuntime.Runtime.Intepreter;
-using ILRuntime.Runtime.Stack;
-using ILRuntime.Reflection;
-using ILRuntime.CLR.Utils;
-
-namespace ILRuntime.Runtime.Generated
-{
-    unsafe class System_Collections_Generic_Queue_1_Dictionary_2_Int64_ILTypeInstance_Binding
-    {
-        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
-        {
-            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
-            MethodBase method;
-            Type[] args;
-            Type type = typeof(System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>>);
-            args = new Type[]{};
-            method = type.GetMethod("get_Count", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Count_0);
-            args = new Type[]{};
-            method = type.GetMethod("Dequeue", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Dequeue_1);
-            args = new Type[]{typeof(System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>)};
-            method = type.GetMethod("Enqueue", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Enqueue_2);
-            args = new Type[]{};
-            method = type.GetMethod("Clear", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Clear_3);
-
-            args = new Type[]{};
-            method = type.GetConstructor(flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Ctor_0);
-
-        }
-
-
-        static StackObject* get_Count_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = instance_of_this_method.Count;
-
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method;
-            return __ret + 1;
-        }
-
-        static StackObject* Dequeue_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = instance_of_this_method.Dequeue();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* Enqueue_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance> @item = (System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            instance_of_this_method.Enqueue(@item);
-
-            return __ret;
-        }
-
-        static StackObject* Clear_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            instance_of_this_method.Clear();
-
-            return __ret;
-        }
-
-
-        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
-
-            var result_of_this_method = new System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Int64, ILRuntime.Runtime.Intepreter.ILTypeInstance>>();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-
-    }
-}

+ 0 - 11
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Queue_1_Dictionary_2_Int64_ILTypeInstance_.cs.meta

@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: fdbab09f652381943a086d16e77191be
-MonoImporter:
-  externalObjects: {}
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 

+ 0 - 124
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Queue_1_Dictionary_2_Type_ILTypeInstance_B.cs

@@ -1,124 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-using ILRuntime.CLR.TypeSystem;
-using ILRuntime.CLR.Method;
-using ILRuntime.Runtime.Enviorment;
-using ILRuntime.Runtime.Intepreter;
-using ILRuntime.Runtime.Stack;
-using ILRuntime.Reflection;
-using ILRuntime.CLR.Utils;
-
-namespace ILRuntime.Runtime.Generated
-{
-    unsafe class System_Collections_Generic_Queue_1_Dictionary_2_Type_ILTypeInstance_Binding
-    {
-        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
-        {
-            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
-            MethodBase method;
-            Type[] args;
-            Type type = typeof(System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>>);
-            args = new Type[]{};
-            method = type.GetMethod("get_Count", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Count_0);
-            args = new Type[]{};
-            method = type.GetMethod("Dequeue", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Dequeue_1);
-            args = new Type[]{typeof(System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>)};
-            method = type.GetMethod("Enqueue", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Enqueue_2);
-            args = new Type[]{};
-            method = type.GetMethod("Clear", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Clear_3);
-
-            args = new Type[]{};
-            method = type.GetConstructor(flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Ctor_0);
-
-        }
-
-
-        static StackObject* get_Count_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = instance_of_this_method.Count;
-
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method;
-            return __ret + 1;
-        }
-
-        static StackObject* Dequeue_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = instance_of_this_method.Dequeue();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* Enqueue_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance> @item = (System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            instance_of_this_method.Enqueue(@item);
-
-            return __ret;
-        }
-
-        static StackObject* Clear_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            instance_of_this_method.Clear();
-
-            return __ret;
-        }
-
-
-        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
-
-            var result_of_this_method = new System.Collections.Generic.Queue<System.Collections.Generic.Dictionary<System.Type, ILRuntime.Runtime.Intepreter.ILTypeInstance>>();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-
-    }
-}

+ 0 - 124
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Queue_1_HashSet_1_ILTypeInstance_Binding.cs

@@ -1,124 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-using ILRuntime.CLR.TypeSystem;
-using ILRuntime.CLR.Method;
-using ILRuntime.Runtime.Enviorment;
-using ILRuntime.Runtime.Intepreter;
-using ILRuntime.Runtime.Stack;
-using ILRuntime.Reflection;
-using ILRuntime.CLR.Utils;
-
-namespace ILRuntime.Runtime.Generated
-{
-    unsafe class System_Collections_Generic_Queue_1_HashSet_1_ILTypeInstance_Binding
-    {
-        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
-        {
-            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
-            MethodBase method;
-            Type[] args;
-            Type type = typeof(System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>>);
-            args = new Type[]{};
-            method = type.GetMethod("get_Count", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Count_0);
-            args = new Type[]{};
-            method = type.GetMethod("Dequeue", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Dequeue_1);
-            args = new Type[]{typeof(System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>)};
-            method = type.GetMethod("Enqueue", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Enqueue_2);
-            args = new Type[]{};
-            method = type.GetMethod("Clear", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Clear_3);
-
-            args = new Type[]{};
-            method = type.GetConstructor(flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Ctor_0);
-
-        }
-
-
-        static StackObject* get_Count_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = instance_of_this_method.Count;
-
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method;
-            return __ret + 1;
-        }
-
-        static StackObject* Dequeue_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            var result_of_this_method = instance_of_this_method.Dequeue();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* Enqueue_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance> @item = (System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
-            System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            instance_of_this_method.Enqueue(@item);
-
-            return __ret;
-        }
-
-        static StackObject* Clear_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>> instance_of_this_method = (System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>>)typeof(System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            instance_of_this_method.Clear();
-
-            return __ret;
-        }
-
-
-        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 0);
-
-            var result_of_this_method = new System.Collections.Generic.Queue<System.Collections.Generic.HashSet<ILRuntime.Runtime.Intepreter.ILTypeInstance>>();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-
-    }
-}

+ 20 - 38
Unity/Assets/Mono/ILRuntime/Generate/System_Collections_Generic_Queue_1_ILTypeInstance_Binding.cs

@@ -22,21 +22,18 @@ namespace ILRuntime.Runtime.Generated
             MethodBase method;
             Type[] args;
             Type type = typeof(System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>);
-            args = new Type[]{typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
-            method = type.GetMethod("Enqueue", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Enqueue_0);
+            args = new Type[]{};
+            method = type.GetMethod("get_Count", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, get_Count_0);
             args = new Type[]{};
             method = type.GetMethod("Dequeue", flag, null, args, null);
             app.RegisterCLRMethodRedirection(method, Dequeue_1);
-            args = new Type[]{};
-            method = type.GetMethod("Peek", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Peek_2);
-            args = new Type[]{};
-            method = type.GetMethod("get_Count", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, get_Count_3);
+            args = new Type[]{typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance)};
+            method = type.GetMethod("Enqueue", flag, null, args, null);
+            app.RegisterCLRMethodRedirection(method, Enqueue_2);
             args = new Type[]{};
             method = type.GetMethod("Clear", flag, null, args, null);
-            app.RegisterCLRMethodRedirection(method, Clear_4);
+            app.RegisterCLRMethodRedirection(method, Clear_3);
 
             args = new Type[]{};
             method = type.GetConstructor(flag, null, args, null);
@@ -45,23 +42,21 @@ namespace ILRuntime.Runtime.Generated
         }
 
 
-        static StackObject* Enqueue_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* get_Count_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            ILRuntime.Runtime.Intepreter.ILTypeInstance @item = (ILRuntime.Runtime.Intepreter.ILTypeInstance)typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
-            __intp.Free(ptr_of_this_method);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
-            instance_of_this_method.Enqueue(@item);
+            var result_of_this_method = instance_of_this_method.Count;
 
-            return __ret;
+            __ret->ObjectType = ObjectTypes.Integer;
+            __ret->Value = result_of_this_method;
+            return __ret + 1;
         }
 
         static StackObject* Dequeue_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
@@ -79,39 +74,26 @@ namespace ILRuntime.Runtime.Generated
             return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
         }
 
-        static StackObject* Peek_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Enqueue_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
+            StackObject* __ret = ILIntepreter.Minus(__esp, 2);
 
             ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
-            System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
+            ILRuntime.Runtime.Intepreter.ILTypeInstance @item = (ILRuntime.Runtime.Intepreter.ILTypeInstance)typeof(ILRuntime.Runtime.Intepreter.ILTypeInstance).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
-            var result_of_this_method = instance_of_this_method.Peek();
-
-            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
-        }
-
-        static StackObject* get_Count_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
-        {
-            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
-            StackObject* ptr_of_this_method;
-            StackObject* __ret = ILIntepreter.Minus(__esp, 1);
-
-            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
+            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
             System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance> instance_of_this_method = (System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>)typeof(System.Collections.Generic.Queue<ILRuntime.Runtime.Intepreter.ILTypeInstance>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
             __intp.Free(ptr_of_this_method);
 
-            var result_of_this_method = instance_of_this_method.Count;
+            instance_of_this_method.Enqueue(@item);
 
-            __ret->ObjectType = ObjectTypes.Integer;
-            __ret->Value = result_of_this_method;
-            return __ret + 1;
+            return __ret;
         }
 
-        static StackObject* Clear_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
+        static StackObject* Clear_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
         {
             ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
             StackObject* ptr_of_this_method;

+ 1 - 1
Unity/Codes/Model/Core/Entity/Game.cs

@@ -58,7 +58,7 @@ namespace ET
         {
             scene?.Dispose();
             scene = null;
-            ObjectPool.Instance.Dispose();
+            MonoPool.Instance.Dispose();
             EventSystem.Instance.Dispose();
             IdGenerater.Instance.Dispose();
         }

+ 14 - 26
Unity/Codes/Model/Core/Object/Entity.cs

@@ -17,15 +17,6 @@ namespace ET
 
     public partial class Entity: DisposeObject
     {
-        [IgnoreDataMember]
-        private static readonly Pool<HashSet<Entity>> hashSetPool = new Pool<HashSet<Entity>>();
-
-        [IgnoreDataMember]
-        private static readonly Pool<Dictionary<Type, Entity>> dictPool = new Pool<Dictionary<Type, Entity>>();
-
-        [IgnoreDataMember]
-        private static readonly Pool<Dictionary<long, Entity>> childrenPool = new Pool<Dictionary<long, Entity>>();
-
         [IgnoreDataMember]
         [BsonIgnore]
         public long InstanceId
@@ -323,7 +314,7 @@ namespace ET
             {
                 if (this.children == null)
                 {
-                    this.children = childrenPool.Fetch();
+                    this.children = MonoPool.Instance.Fetch<Dictionary<long, Entity>>();
                 }
                 return this.children;
             }
@@ -346,7 +337,7 @@ namespace ET
 
             if (this.children.Count == 0)
             {
-                childrenPool.Recycle(this.children);
+                MonoPool.Instance.Recycle(this.children);
                 this.children = null;
             }
 
@@ -360,7 +351,7 @@ namespace ET
                 return;
             }
 
-            this.childrenDB = this.childrenDB ?? hashSetPool.Fetch();
+            this.childrenDB = this.childrenDB ?? MonoPool.Instance.Fetch<HashSet<Entity>>();
 
             this.childrenDB.Add(entity);
         }
@@ -383,7 +374,7 @@ namespace ET
             {
                 if (this.IsFromPool)
                 {
-                    hashSetPool.Recycle(this.childrenDB);
+                    MonoPool.Instance.Recycle(this.childrenDB);
                     this.childrenDB = null;
                 }
             }
@@ -406,7 +397,7 @@ namespace ET
             {
                 if (this.components == null)
                 {
-                    this.components = dictPool.Fetch();
+                    this.components = MonoPool.Instance.Fetch<Dictionary<Type, Entity>>();
                 }
                 return this.components;
             }
@@ -431,7 +422,7 @@ namespace ET
                 }
 
                 this.components.Clear();
-                dictPool.Recycle(this.components);
+                MonoPool.Instance.Recycle(this.components);
                 this.components = null;
 
                 // 从池中创建的才需要回到池中,从db中不需要回收
@@ -441,7 +432,7 @@ namespace ET
 
                     if (this.IsFromPool)
                     {
-                        hashSetPool.Recycle(this.componentsDB);
+                        MonoPool.Instance.Recycle(this.componentsDB);
                         this.componentsDB = null;
                     }
                 }
@@ -456,7 +447,7 @@ namespace ET
                 }
 
                 this.children.Clear();
-                childrenPool.Recycle(this.children);
+                MonoPool.Instance.Recycle(this.children);
                 this.children = null;
 
                 if (this.childrenDB != null)
@@ -465,7 +456,7 @@ namespace ET
                     // 从池中创建的才需要回到池中,从db中不需要回收
                     if (this.IsFromPool)
                     {
-                        hashSetPool.Recycle(this.childrenDB);
+                        MonoPool.Instance.Recycle(this.childrenDB);
                         this.childrenDB = null;
                     }
                 }
@@ -490,15 +481,12 @@ namespace ET
 
             this.parent = null;
 
+            base.Dispose();
+            
             if (this.IsFromPool)
             {
                 ObjectPool.Instance.Recycle(this);
             }
-            else
-            {
-                base.Dispose();
-            }
-
             status = EntityStatus.None;
         }
 
@@ -511,7 +499,7 @@ namespace ET
             
             if (this.componentsDB == null)
             {
-                this.componentsDB = hashSetPool.Fetch();
+                this.componentsDB = MonoPool.Instance.Fetch<HashSet<Entity>>();
             }
 
             this.componentsDB.Add(component);
@@ -532,7 +520,7 @@ namespace ET
             this.componentsDB.Remove(component);
             if (this.componentsDB.Count == 0 && this.IsFromPool)
             {
-                hashSetPool.Recycle(this.componentsDB);
+                MonoPool.Instance.Recycle(this.componentsDB);
                 this.componentsDB = null;
             }
         }
@@ -554,7 +542,7 @@ namespace ET
 
             if (this.components.Count == 0 && this.IsFromPool)
             {
-                dictPool.Recycle(this.components);
+                MonoPool.Instance.Recycle(this.components);
                 this.components = null;
             }
 

+ 20 - 98
Unity/Codes/Model/Core/Object/ObjectPool.cs

@@ -3,124 +3,46 @@ using System.Collections.Generic;
 
 namespace ET
 {
-    public class ComponentQueue: DisposeObject
+    public class ObjectPool: IDisposable
     {
-        public string TypeName
+        private readonly Dictionary<Type, Queue<Entity>> pool = new Dictionary<Type, Queue<Entity>>();
+        
+        public static ObjectPool Instance = new ObjectPool();
+        
+        private ObjectPool()
         {
-            get;
         }
 
-        private readonly Queue<DisposeObject> queue = new Queue<DisposeObject>();
-
-        public ComponentQueue(string typeName)
-        {
-            this.TypeName = typeName;
-        }
-
-        public void Enqueue(DisposeObject entity)
-        {
-            this.queue.Enqueue(entity);
-        }
-
-        public DisposeObject Dequeue()
-        {
-            return this.queue.Dequeue();
-        }
-
-        public DisposeObject Peek()
-        {
-            return this.queue.Peek();
-        }
-
-        public Queue<DisposeObject> Queue => this.queue;
-
-        public int Count => this.queue.Count;
-
-        public override void Dispose()
-        {
-            while (this.queue.Count > 0)
-            {
-                DisposeObject component = this.queue.Dequeue();
-                component.Dispose();
-            }
-        }
-    }
-
-    public class ObjectPool: DisposeObject
-    {
-        private static ObjectPool instance;
-
-        public static ObjectPool Instance
+        public Entity Fetch(Type type)
         {
-            get
+            Queue<Entity> queue = null;
+            if (!pool.TryGetValue(type, out queue))
             {
-                if (instance == null)
-                {
-                    instance = new ObjectPool();
-                }
-
-                return instance;
+                return Activator.CreateInstance(type) as Entity;
             }
-        }
 
-        private readonly Dictionary<Type, ComponentQueue> dictionary = new Dictionary<Type, ComponentQueue>();
-
-        public DisposeObject Fetch(Type type)
-        {
-            DisposeObject obj;
-            if (!this.dictionary.TryGetValue(type, out ComponentQueue queue))
+            if (queue.Count == 0)
             {
-                obj = (DisposeObject) Activator.CreateInstance(type);
+                return Activator.CreateInstance(type) as Entity;
             }
-            else if (queue.Count == 0)
-            {
-                obj = (DisposeObject) Activator.CreateInstance(type);
-            }
-            else
-            {
-                obj = queue.Dequeue();
-            }
-
-            return obj;
-        }
-
-        public T Fetch<T>() where T : DisposeObject
-        {
-            T t = (T) this.Fetch(typeof (T));
-            return t;
+            return queue.Dequeue();
         }
 
-        public void Recycle(DisposeObject obj)
+        public void Recycle(Entity obj)
         {
             Type type = obj.GetType();
-            ComponentQueue queue;
-            if (!this.dictionary.TryGetValue(type, out queue))
+            Queue<Entity> queue = null;
+            if (!pool.TryGetValue(type, out queue))
             {
-                queue = new ComponentQueue(type.Name);
-                this.dictionary.Add(type, queue);
+                queue = new Queue<Entity>();
+                pool.Add(type, queue);
             }
             queue.Enqueue(obj);
         }
 
-        public void Clear()
+        public void Dispose()
         {
-            foreach (KeyValuePair<Type, ComponentQueue> kv in this.dictionary)
-            {
-                kv.Value.Dispose();
-            }
-
-            this.dictionary.Clear();
-        }
-
-        public override void Dispose()
-        {
-            foreach (KeyValuePair<Type, ComponentQueue> kv in this.dictionary)
-            {
-                kv.Value.Dispose();
-            }
-
-            this.dictionary.Clear();
-            instance = null;
+            this.pool.Clear();
         }
     }
 }

+ 0 - 29
Unity/Codes/Model/Core/Pool.cs

@@ -1,29 +0,0 @@
-using System.Collections.Generic;
-
-namespace ET
-{
-    public class Pool<T> where T: class, new()
-    {
-        private readonly Queue<T> pool = new Queue<T>();
-        
-        public T Fetch()
-        {
-            if (pool.Count == 0)
-            {
-                return new T();
-            }
-
-            return pool.Dequeue();
-        }
-		
-        public void Recycle(T t)
-        {
-            pool.Enqueue(t);
-        }
-
-        public void Clear()
-        {
-            this.pool.Clear();
-        }
-    }
-}

+ 10 - 0
Unity/Codes/Model/Core/PoolHelper.cs

@@ -0,0 +1,10 @@
+namespace ET
+{
+    public static class PoolHelper
+    {
+        public static T Fetch<T>(this MonoPool monoPool) where T: class
+        {
+            return monoPool.Fetch(typeof (T)) as T;
+        }
+    }
+}

+ 12 - 13
Unity/Unity.Mono.csproj

@@ -110,7 +110,6 @@
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_HashSet_1_Type_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_HashSet_1_ILTypeInstance_Binding.cs" />
      <Compile Include="Assets\Mono\Core\Async\ETTask.cs" />
-     <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_Queue_1_HashSet_1_ILTypeInstance_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Runtime_CompilerServices_TaskAwaiter_Binding.cs" />
      <Compile Include="Assets\Mono\Module\Network\AChannel.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Activator_Binding.cs" />
@@ -143,8 +142,8 @@
      <Compile Include="Assets\Mono\ILRuntime\ILStaticMethod.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\ET_ETVoid_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\ET_ETAsyncTaskMethodBuilder_1_Object_Array_Binding.cs" />
-     <Compile Include="Assets\Mono\ILRuntime\Generate\UnityEngine_LayerMask_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_HashSet_1_UInt16_Binding.cs" />
+     <Compile Include="Assets\Mono\ILRuntime\Generate\UnityEngine_LayerMask_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_List_1_ETTask_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_Dictionary_2_Int64_ILTypeInstance_Binding__t1.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_Dictionary_2_String_Assembly_Binding_Value.cs" />
@@ -167,7 +166,6 @@
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_Dictionary_2_Type_ILTypeInstance_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\ET_RpcException_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_List_1_Type_Binding_Enumerator_Binding.cs" />
-     <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_Queue_1_Dictionary_2_Int64_ILTypeInstance_.cs" />
      <Compile Include="Assets\Mono\CodeLoader.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\UnityEngine_UI_Button_Binding.cs" />
      <Compile Include="Assets\Mono\Core\Log\Log.cs" />
@@ -303,13 +301,12 @@
      <Compile Include="Assets\Mono\Helper\MonoStaticMethod.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\ReferenceCollector_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Array_Binding.cs" />
-     <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_Dictionary_2_String_Byte_Array_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\UnityEngine_Physics_Binding.cs" />
+     <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_Dictionary_2_String_Byte_Array_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Reflection_AssemblyName_Binding.cs" />
-     <Compile Include="Assets\Mono\Core\Helper\StringHelper.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_List_1_Single_Binding.cs" />
+     <Compile Include="Assets\Mono\Core\Helper\StringHelper.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\ET_AcceptAllCertificate_Binding.cs" />
-     <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_Queue_1_Dictionary_2_Type_ILTypeInstance_B.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_List_1_Int64_Binding_Enumerator_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\ProtoBuf_Serializer_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\ET_ListComponent_1_ILTypeInstance_Binding.cs" />
@@ -323,7 +320,9 @@
      <Compile Include="Assets\Mono\ILRuntime\Generate\UnityEngine_Quaternion_Binding.cs" />
      <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_HashSet_1_AService_Binding_Enumerator_Bind.cs" />
      <Compile Include="Assets\Mono\Define.cs" />
-     <Compile Include="Assets\Mono\Core\Pool.cs" />
+     <Compile Include="Assets\Mono\Core\MonoPool.cs" />
+     <Compile Include="Assets\Mono\ILRuntime\Generate\ET_MonoPool_Binding.cs" />
+     <Compile Include="Assets\Mono\ILRuntime\Generate\System_Collections_Generic_Dictionary_2_Type_Queue_1_ILTypeInstance_B.cs" />
      <None Include="Assets\Mono\Unity.Mono.asmdef" />
      <Reference Include="UnityEngine">
      <HintPath>C:/Apps/Unity/2020.3.23f1c1/Editor/Data/Managed/UnityEngine/UnityEngine.dll</HintPath>
@@ -547,21 +546,21 @@
      <Reference Include="UnityEditor.WindowsStandalone.Extensions">
      <HintPath>C:/Apps/Unity/2020.3.23f1c1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll</HintPath>
      </Reference>
-     <Reference Include="CommandLine">
-     <HintPath>E:/ET/Unity/Assets/Plugins/CommandLine.dll</HintPath>
-     </Reference>
-     <Reference Include="ICSharpCode.SharpZipLib">
-     <HintPath>E:/ET/Unity/Assets/Plugins/ICSharpCode.SharpZipLib.dll</HintPath>
-     </Reference>
      <Reference Include="ILRuntime.Mono.Cecil">
      <HintPath>E:/ET/Unity/Assets/ThirdParty/ILRuntime/Plugins/ILRuntime.Mono.Cecil.dll</HintPath>
      </Reference>
      <Reference Include="ILRuntime.Mono.Cecil.Mdb">
      <HintPath>E:/ET/Unity/Assets/ThirdParty/ILRuntime/Plugins/ILRuntime.Mono.Cecil.Mdb.dll</HintPath>
      </Reference>
+     <Reference Include="CommandLine">
+     <HintPath>E:/ET/Unity/Assets/Plugins/CommandLine.dll</HintPath>
+     </Reference>
      <Reference Include="ILRuntime.Mono.Cecil.Pdb">
      <HintPath>E:/ET/Unity/Assets/ThirdParty/ILRuntime/Plugins/ILRuntime.Mono.Cecil.Pdb.dll</HintPath>
      </Reference>
+     <Reference Include="ICSharpCode.SharpZipLib">
+     <HintPath>E:/ET/Unity/Assets/Plugins/ICSharpCode.SharpZipLib.dll</HintPath>
+     </Reference>
      <Reference Include="mscorlib">
      <HintPath>C:/Apps/Unity/2020.3.23f1c1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll</HintPath>
      </Reference>

+ 80 - 80
Unity/Unity.ThirdParty.csproj

@@ -41,96 +41,163 @@
     <ImplicitlyExpandDesignTimeFacades>false</ImplicitlyExpandDesignTimeFacades>
   </PropertyGroup>
   <ItemGroup>
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSBindBreakpoint.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\CLRBindingUtils.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Meta\TypeModel.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\MapDecorator.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\ListDecorator.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSResolveVariable.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCBindBreakpointResult.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\PropertyDecorator.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\ArrayDecorator.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\ISerializerProxy.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\GuidSerializer.cs" />
      <Compile Include="Assets\ThirdParty\ShareLib\Kcp\Kcp.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\BufferPool.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\DebuggerServer\DebuggerServer.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\StackFrameInfo.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Meta\CallbackSet.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\IProtoSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Meta\TypeFormatEventArgs.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\ImmutableCollectionDecorator.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Intepreter\ILRuntimeException.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\Int64Serializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializer.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Stack\StackObject.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Compiler\CompilerContext.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\SurrogateSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\MemberSpecifiedDecorator.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\FieldBindingGenerator.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Other\ByReferenceKeyComparer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ProtoIgnoreAttribute.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\IExtension.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\CLRRedirections.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ProtobufPropertyHelper.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\ValueTypeBindingGenerator.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Other\UncheckedStack.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSEnumChildren.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\FieldDecorator.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\DefaultValueDecorator.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCStepComplete.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\DataFormat.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ServiceModel\ProtoBehaviorAttribute.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\DebugSocket.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\DelegateManager.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSResolveIndexer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\SingleSerializer.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\VariableInfo.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\DebugMessageType.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\StringSerializer.cs" />
      <Compile Include="Assets\ThirdParty\LitJson\JsonReader.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\IProtoTypeSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ImplicitFields.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\Utils\Extensions.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\ProtoDecoratorBase.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\TagDecorator.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\UInt32Serializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Meta\RuntimeTypeModel.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ProtoConverterAttribute.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\TypeSystem\IType.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ServiceModel\ProtoBehaviorExtensionElement.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\StepTypes.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCBreakpointHit.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\ParseableSerializer.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimeParameterInfo.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCAttachResult.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\SByteSerializer.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Extensions.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\SubItemSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\WireType.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\AppDomain.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ProtoContractAttribute.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Helpers.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Adaptors\CLRCrossBindingAdaptors.cs" />
      <Compile Include="Assets\ThirdParty\LitJson\JsonException.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\BindingGeneratorExtensions.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\CharSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\NullDecorator.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\DiscriminatedUnion.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\BreakpointInfo.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ExtensibleUtil.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\TypeSystem\CLRType.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCEnumChildrenResult.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Intepreter\ILIntepreter.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSStep.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimeFieldInfo.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\BindingCodeGenerator.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\KeyValuePairProxy.cs" />
      <Compile Include="Assets\ThirdParty\LitJson\JsonWriter.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\CrossBindingMethodInfo.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\DateTimeSerializer.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\Method\ExceptionHandler.cs" />
      <Compile Include="Assets\ThirdParty\LitJson\Extensions.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimePropertyInfo.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\ConstructorBindingGenerator.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Compiler\CompilerDelegates.cs" />
      <Compile Include="Assets\ThirdParty\LitJson\JsonData.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\ByteSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\BclHelpers.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\CompiledSerializer.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\CommonBindingGenerator.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Meta\BasicList.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\CrossBindingCodeGenerator.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Intepreter\ILTypeInstance.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSDeleteBreakpoint.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCResolveVariableResult.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\InvocationContext.cs" />
      <Compile Include="Assets\ThirdParty\LitJson\JsonMockWrapper.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Stack\RuntimeStack.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimeMethodInfo.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\BreakPointContext.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\SerializationContext.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\BufferExtension.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Other\DelegateExportAttribute.cs" />
      <Compile Include="Assets\ThirdParty\LitJson\Lexer.cs" />
      <Compile Include="Assets\ThirdParty\LitJson\UnityTypeBindings.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\ReflectedUriDecorator.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Other\UncheckedList.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ServiceModel\ProtoOperationBehavior.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ServiceModel\XmlProtoSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ProtoException.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Intepreter\OpCodes\OpCodeEnum.cs" />
      <Compile Include="Assets\ThirdParty\LitJson\JsonMapper.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Extensible.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\MethodBindingGenerator_old.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCModuleLoaded.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Meta\ValueMember.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ProtoReader.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\DecimalSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\BooleanSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\DoubleSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\SubItemToken.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\Method\IMethod.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Meta\SubType.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\Method\CLRMethod.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\TypeSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\IExtensible.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\Extensions.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\ValueTypeBinder.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\CallbackAttributes.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\TupleSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\Int16Serializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ProtoMapAttribute.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\MethodBindingGenerator.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Meta\MetaType.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Meta\AttributeMap.cs" />
      <Compile Include="Assets\ThirdParty\LitJson\ParserToken.cs" />
      <Compile Include="Assets\ThirdParty\LitJson\Netstandard15Polyfill.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\NetObjectSerializer.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Stack\StackFrame.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\PrefixStyle.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\DebugService.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\TimeSpanSerializer.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimeType.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Compiler\Local.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ProtoEnumAttribute.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCThreadStarted.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Intepreter\OpCodes\OpCode.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\Method\ILMethod.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Intepreter\DelegateAdapter.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\GlobalSuppressions.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ProtoMemberAttribute.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\NetObjectCache.cs" />
@@ -140,88 +207,21 @@
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\EnumSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\Int32Serializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\SystemTypeSerializer.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSExecute.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\ProtoIncludeAttribute.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimeWrapperType.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\UriDecorator.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\TypeSystem\ILType.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\BlobSerializer.cs" />
      <Compile Include="Assets\ThirdParty\protobuf-net\PType.cs" />
-     <Compile Include="Assets\ThirdParty\LitJson\IJsonWrapper.cs" />
-     <Compile Include="Assets\ThirdParty\protobuf-net\Meta\ProtoSyntax.cs" />
-     <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\UInt16Serializer.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\TypeSystem\ILType.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\BindingCodeGenerator.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\ValueTypeBindingGenerator.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Other\UncheckedStack.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\StepTypes.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\BindingGeneratorExtensions.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCBreakpointHit.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSEnumChildren.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Stack\StackObject.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\DebugService.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\CrossBindingMethodInfo.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSBindBreakpoint.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\CLRBindingUtils.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\DebuggerServer\DebuggerServer.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\StackFrameInfo.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\MethodBindingGenerator.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Intepreter\ILTypeInstance.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimeParameterInfo.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCAttachResult.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\Method\ExceptionHandler.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Intepreter\OpCodes\OpCodeEnum.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSDeleteBreakpoint.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCResolveVariableResult.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimePropertyInfo.cs" />
      <Compile Include="Assets\ThirdParty\ILRuntime\CLR\TypeSystem\ILGenericParameterType.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\Method\IMethod.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCStepComplete.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimeType.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Extensions.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSResolveVariable.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\InvocationContext.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\ConstructorBindingGenerator.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\FieldBindingGenerator.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\BreakpointInfo.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\DebugSocket.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\Method\CLRMethod.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\TypeSystem\CLRType.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\MethodBindingGenerator_old.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\DelegateManager.cs" />
      <Compile Include="Assets\ThirdParty\ILRuntime\Other\ThreadSafeDictionary.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCModuleLoaded.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Other\DelegateExportAttribute.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimeConstructorInfo.cs" />
      <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\CrossBindingAdaptor.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCEnumChildrenResult.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Other\ByReferenceKeyComparer.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCBindBreakpointResult.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Stack\RuntimeStack.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\Utils\Extensions.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Stack\StackFrame.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimeMethodInfo.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSResolveIndexer.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Intepreter\ILIntepreter.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSExecute.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\CSStep.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\Protocol\SCThreadStarted.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\CLRBinding\CommonBindingGenerator.cs" />
+     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimeConstructorInfo.cs" />
      <Compile Include="Assets\ThirdParty\ILRuntime\Other\NeedAdaptorAttribute.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\Method\ILMethod.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\CLRRedirections.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Intepreter\OpCodes\OpCode.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\AppDomain.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\Extensions.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\BreakPointContext.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimeFieldInfo.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Intepreter\DelegateAdapter.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\VariableInfo.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Debugger\DebugMessageType.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\CrossBindingCodeGenerator.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Intepreter\ILRuntimeException.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Reflection\ILRuntimeWrapperType.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Enviorment\ValueTypeBinder.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\CLR\TypeSystem\IType.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Other\UncheckedList.cs" />
-     <Compile Include="Assets\ThirdParty\ILRuntime\Runtime\Adaptors\CLRCrossBindingAdaptors.cs" />
+     <Compile Include="Assets\ThirdParty\LitJson\IJsonWrapper.cs" />
+     <Compile Include="Assets\ThirdParty\protobuf-net\Meta\ProtoSyntax.cs" />
+     <Compile Include="Assets\ThirdParty\protobuf-net\Serializers\UInt16Serializer.cs" />
      <None Include="Assets\ThirdParty\Unity.ThirdParty.asmdef" />
      <Reference Include="UnityEngine">
      <HintPath>C:/Apps/Unity/2020.3.23f1c1/Editor/Data/Managed/UnityEngine/UnityEngine.dll</HintPath>
@@ -445,21 +445,21 @@
      <Reference Include="UnityEditor.WindowsStandalone.Extensions">
      <HintPath>C:/Apps/Unity/2020.3.23f1c1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll</HintPath>
      </Reference>
-     <Reference Include="CommandLine">
-     <HintPath>E:/ET/Unity/Assets/Plugins/CommandLine.dll</HintPath>
-     </Reference>
-     <Reference Include="ICSharpCode.SharpZipLib">
-     <HintPath>E:/ET/Unity/Assets/Plugins/ICSharpCode.SharpZipLib.dll</HintPath>
-     </Reference>
      <Reference Include="ILRuntime.Mono.Cecil">
      <HintPath>E:/ET/Unity/Assets/ThirdParty/ILRuntime/Plugins/ILRuntime.Mono.Cecil.dll</HintPath>
      </Reference>
      <Reference Include="ILRuntime.Mono.Cecil.Mdb">
      <HintPath>E:/ET/Unity/Assets/ThirdParty/ILRuntime/Plugins/ILRuntime.Mono.Cecil.Mdb.dll</HintPath>
      </Reference>
+     <Reference Include="CommandLine">
+     <HintPath>E:/ET/Unity/Assets/Plugins/CommandLine.dll</HintPath>
+     </Reference>
      <Reference Include="ILRuntime.Mono.Cecil.Pdb">
      <HintPath>E:/ET/Unity/Assets/ThirdParty/ILRuntime/Plugins/ILRuntime.Mono.Cecil.Pdb.dll</HintPath>
      </Reference>
+     <Reference Include="ICSharpCode.SharpZipLib">
+     <HintPath>E:/ET/Unity/Assets/Plugins/ICSharpCode.SharpZipLib.dll</HintPath>
+     </Reference>
      <Reference Include="mscorlib">
      <HintPath>C:/Apps/Unity/2020.3.23f1c1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll</HintPath>
      </Reference>