public static void Run(string commaSeparatedListOfAssemblies)
        {
            var assemblies = commaSeparatedListOfAssemblies.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

            APIUpdaterLogger.WriteToFile("Started to update {0} assemblie(s)", assemblies.Count());

            var sw = new Stopwatch();

            sw.Start();

            foreach (var assemblyPath in assemblies)
            {
                if (!AssemblyHelper.IsManagedAssembly(assemblyPath))
                {
                    continue;
                }

                string stdOut, stdErr;
                var    assemblyFullPath = ResolveAssemblyPath(assemblyPath);
                var    exitCode         = RunUpdatingProgram("AssemblyUpdater.exe", "-u -a " + assemblyFullPath + APIVersionArgument() + AssemblySearchPathArgument() + ConfigurationProviderAssembliesPathArgument(), out stdOut, out stdErr);
                if (stdOut.Length > 0)
                {
                    APIUpdaterLogger.WriteToFile("Assembly update output ({0})\r\n{1}", assemblyFullPath, stdOut);
                }

                if (IsError(exitCode))
                {
                    APIUpdaterLogger.WriteErrorToConsole("Error {0} running AssemblyUpdater. Its output is: `{1}`", exitCode, stdErr);
                }
            }

            APIUpdaterLogger.WriteToFile("Update finished in {0}s", sw.Elapsed.TotalSeconds);
        }
        public static void Run(string commaSeparatedListOfAssemblies)
        {
            string[] strArray = commaSeparatedListOfAssemblies.Split(new char[1] {
                ','
            }, StringSplitOptions.RemoveEmptyEntries);
            APIUpdaterLogger.WriteToFile("Started to update {0} assemblie(s)", (object)((IEnumerable <string>)strArray).Count <string>());
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();
            foreach (string str1 in strArray)
            {
                if (AssemblyHelper.IsManagedAssembly(str1))
                {
                    string str2 = APIUpdaterHelper.ResolveAssemblyPath(str1);
                    string stdOut;
                    string stdErr;
                    int    num = APIUpdaterHelper.RunUpdatingProgram("AssemblyUpdater.exe", "-u -a " + str2 + APIUpdaterHelper.APIVersionArgument() + APIUpdaterHelper.AssemblySearchPathArgument() + APIUpdaterHelper.ConfigurationProviderAssembliesPathArgument(), out stdOut, out stdErr);
                    if (stdOut.Length > 0)
                    {
                        APIUpdaterLogger.WriteToFile("Assembly update output ({0})\r\n{1}", (object)str2, (object)stdOut);
                    }
                    if (num < 0)
                    {
                        APIUpdaterLogger.WriteErrorToConsole("Error {0} running AssemblyUpdater. Its output is: `{1}`", (object)num, (object)stdErr);
                    }
                }
            }
            APIUpdaterLogger.WriteToFile("Update finished in {0}s", (object)stopwatch.Elapsed.TotalSeconds);
        }
        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 (AssemblyHelper.IsManagedAssembly(text))
                {
                    string text2 = APIUpdaterHelper.ResolveAssemblyPath(text);
                    string text3;
                    string text4;
                    int    num = APIUpdaterHelper.RunUpdatingProgram("AssemblyUpdater.exe", string.Concat(new string[]
                    {
                        "-u -a ",
                        text2,
                        APIUpdaterHelper.APIVersionArgument(),
                        APIUpdaterHelper.AssemblySearchPathArgument(),
                        APIUpdaterHelper.ConfigurationProviderAssembliesPathArgument()
                    }), out text3, out text4);
                    if (text3.Length > 0)
                    {
                        APIUpdaterLogger.WriteToFile("Assembly update output ({0})\r\n{1}", new object[]
                        {
                            text2,
                            text3
                        });
                    }
                    if (APIUpdaterHelper.IsError(num))
                    {
                        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
            });
        }
        private static string AssemblySearchPathArgument(IEnumerable <string> configurationSourceDirectories = null)
        {
            var req = PackageManager.Client.List(offlineMode: true, includeIndirectDependencies: true);

            while (!req.IsCompleted)
            {
                System.Threading.Thread.Sleep(10);
            }

            var packagePathsToSearchForAssemblies = new StringBuilder();

            if (req.Status == PackageManager.StatusCode.Success)
            {
                foreach (var resolvedPackage in req.Result)
                {
                    packagePathsToSearchForAssemblies.Append($"{Path.PathSeparator}+{resolvedPackage.resolvedPath.Escape(Path.PathSeparator)}");
                }
            }
            else
            {
                APIUpdaterLogger.WriteToFile(L10n.Tr($"Unable to retrieve project configured packages; AssemblyUpdater may fail to resolve assemblies from packages. Status = {req.Error?.message} ({req.Error?.errorCode})"));
            }

            var searchPath = NetStandardFinder.GetReferenceDirectory().Escape(Path.PathSeparator) + Path.PathSeparator
                             + NetStandardFinder.GetNetStandardCompatShimsDirectory().Escape(Path.PathSeparator) + Path.PathSeparator
                             + NetStandardFinder.GetDotNetFrameworkCompatShimsDirectory().Escape(Path.PathSeparator) + Path.PathSeparator
                             + "+" + Application.dataPath.Escape(Path.PathSeparator)
                             + packagePathsToSearchForAssemblies.ToString();

            if (configurationSourceDirectories != null)
            {
                var searchPathFromConfigSources = configurationSourceDirectories.Aggregate("", (acc, curr) => acc + $"{Path.PathSeparator}+" + curr.Escape(Path.PathSeparator));
                searchPath += searchPathFromConfigSources;
            }

            return(" -s \"" + searchPath + "\"");
        }