Testing_Invoke() приватный статический Метод

private static Testing_Invoke ( string klass, string method ) : void
klass string
method string
Результат void
Пример #1
0
 public static void Testing_DummyConflictResolutionFunction(string[] conflicting)
 {
     ASEditorBackend.Testing_Invoke(ASEditorBackend.s_TestingConflictResClass, ASEditorBackend.s_TestingConflictResFunction, new object[]
     {
         conflicting
     });
 }
Пример #2
0
 private static void Testing_DummyCallback(bool success)
 {
     ASEditorBackend.Testing_Invoke(AssetServer.GetAndRemoveString("s_TestingClass"), AssetServer.GetAndRemoveString("s_TestingFunction"), new object[]
     {
         success
     });
 }
Пример #3
0
 private static void Testing_Invoke(string klass, string method, params object[] prms)
 {
     try
     {
         AppDomain  currentDomain = AppDomain.CurrentDomain;
         Assembly[] assemblies    = currentDomain.GetAssemblies();
         for (int i = 0; i < assemblies.Length; i++)
         {
             Assembly assembly = assemblies[i];
             if (assembly.GetName().Name != "UnityEditor" && assembly.GetName().Name != "UnityEngine")
             {
                 Type[] typesFromAssembly = AssemblyHelper.GetTypesFromAssembly(assembly);
                 for (int j = 0; j < typesFromAssembly.Length; j++)
                 {
                     Type type = typesFromAssembly[j];
                     if (type.Name == klass)
                     {
                         type.InvokeMember(method, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.InvokeMethod, null, null, prms);
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         if (ex.InnerException != null && ex.InnerException.GetType() == typeof(ExitGUIException))
         {
             throw ex;
         }
         ASEditorBackend.Testing_Invoke(AssetServer.GetString("s_ExceptionHandlerClass"), AssetServer.GetString("s_ExceptionHandlerFunction"), new object[]
         {
             ex
         });
     }
 }
Пример #4
0
 private static void Testing_Invoke(string klass, string method, params object[] prms)
 {
     try
     {
         foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
         {
             if (assembly.GetName().Name != "UnityEditor" && assembly.GetName().Name != "UnityEngine")
             {
                 foreach (System.Type type in AssemblyHelper.GetTypesFromAssembly(assembly))
                 {
                     if (type.Name == klass)
                     {
                         type.InvokeMember(method, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.InvokeMethod, (Binder)null, (object)null, prms);
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         if (ex.InnerException != null && ex.InnerException.GetType() == typeof(ExitGUIException))
         {
             throw ex;
         }
         ASEditorBackend.Testing_Invoke(AssetServer.GetString("s_ExceptionHandlerClass"), AssetServer.GetString("s_ExceptionHandlerFunction"), (object)ex);
     }
 }