예제 #1
0
        public static bool IsManagedAssembly(string file)
        {
            DllType dllType = InternalEditorUtility.DetectDotNetDll(file);

            if (dllType != DllType.Unknown)
            {
                return(dllType != DllType.Native);
            }
            return(false);
        }
예제 #2
0
        private static bool IsManagedDll(string f)
        {
            var dllType = InternalEditorUtility.DetectDotNetDll(f);

            switch (dllType)
            {
            case DllType.ManagedNET35:
            case DllType.ManagedNET40:
            case DllType.UnknownManaged:
                return(true);

            default:
                return(false);
            }
        }
예제 #3
0
        public static void Run(string commaSeparatedListOfAssemblies)
        {
            string[] array = commaSeparatedListOfAssemblies.Split(new char[]
            {
                ','
            }, StringSplitOptions.RemoveEmptyEntries);
            APIUpdaterLogger.WriteToFile("Started to update {0} assemblie(s)", new object[]
            {
                array.Count <string>()
            });
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();
            string[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                string text = array2[i];
                if (InternalEditorUtility.DetectDotNetDll(text))
                {
                    string text2 = APIUpdaterHelper.ResolveAssemblyPath(text);
                    string text3;
                    string text4;
                    int    num = APIUpdaterHelper.RunUpdatingProgram("AssemblyUpdater.exe", "-u -a " + text2 + APIUpdaterHelper.APIVersionArgument() + APIUpdaterHelper.AssemblySearchPathArgument(), out text3, out text4);
                    if (text3.Length > 0)
                    {
                        APIUpdaterLogger.WriteToFile("Assembly update output ({0})\r\n{1}", new object[]
                        {
                            text2,
                            text3
                        });
                    }
                    if (num < 0)
                    {
                        APIUpdaterLogger.WriteErrorToConsole("Error {0} running AssemblyUpdater. Its output is: `{1}`", new object[]
                        {
                            num,
                            text4
                        });
                    }
                }
            }
            APIUpdaterLogger.WriteToFile("Update finished in {0}s", new object[]
            {
                stopwatch.Elapsed.TotalSeconds
            });
        }
예제 #4
0
        public static bool DoesAssemblyRequireUpgrade(string assetFullPath)
        {
            if (!File.Exists(assetFullPath))
            {
                return(false);
            }
            if (!InternalEditorUtility.DetectDotNetDll(assetFullPath))
            {
                return(false);
            }
            string text;
            string text2;
            int    num = APIUpdaterHelper.RunUpdatingProgram("AssemblyUpdater.exe", string.Concat(new string[]
            {
                APIUpdaterHelper.TimeStampArgument(),
                APIUpdaterHelper.APIVersionArgument(),
                "--check-update-required -a ",
                CommandLineFormatter.PrepareFileName(assetFullPath),
                APIUpdaterHelper.AssemblySearchPathArgument()
            }), out text, out text2);

            Console.WriteLine("{0}{1}", text, text2);
            switch (num)
            {
            case 0:
            case 1:
                return(false);

            case 2:
                return(true);

            default:
                UnityEngine.Debug.LogError(text + Environment.NewLine + text2);
                return(false);
            }
        }
예제 #5
0
        static bool IsManagedAssembly(string systemPath)
        {
            DllType dllType = InternalEditorUtility.DetectDotNetDll(systemPath);

            return(dllType != DllType.Unknown && dllType != DllType.Native);
        }