示例#1
0
        public static void Main(string[] args)
        {
            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();

            UnrealTypes.Load();
            AssemblyRewriter rewriter = new AssemblyRewriter();

            if (System.Diagnostics.Debugger.IsAttached && args.Length == 0)
            {
                ManagedUnrealReflectionBase.UpdateSerializerCode();
                //RunTests(rewriter);
            }

            AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;

            foreach (string filePath in args)
            {
                ProcessAssembly(rewriter, filePath);
                additionalAssemblySearchPath = null;
            }

            stopwatch.Stop();
            Console.WriteLine("AssemblyRewriter finished " + stopwatch.Elapsed);
            Console.ReadLine();
        }
示例#2
0
        public static void Main(string[] args)
        {
            if (!args.Any())
            {
                Console.Error.WriteLine("Error: No input files. Add file path to dll as argument.");
                Environment.Exit(2);
            }

            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();

            UnrealTypes.Load();
            AssemblyRewriter rewriter = new AssemblyRewriter();

            if (Debugger.IsAttached)
            {
                ManagedUnrealReflectionBase.UpdateSerializerCode();
                //RunTests(rewriter);
            }

            AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;

            foreach (string filePath in args)
            {
                Console.WriteLine("Processing file: " + filePath);
                if (!ProcessAssembly(rewriter, filePath))
                {
                    Environment.ExitCode = 3;
                    break;
                }
                additionalAssemblySearchPath = null;
            }

            stopwatch.Stop();
            Console.WriteLine("AssemblyRewriter finished " + stopwatch.Elapsed);
            if (ManagedUnrealModuleInfo.NumWarnings > 0)
            {
                Console.WriteLine("!!!!!! " + ManagedUnrealModuleInfo.NumWarnings + " warning(s) whilst running AssemblyRewriter");
                ManagedUnrealModuleInfo.NumWarnings = 0;
            }
        }
示例#3
0
        public static void Main(string[] args)
        {
            if (!args.Any())
            {
                Console.Error.WriteLine($"Error: No input files. Add file path to dll as argument.");
                Environment.Exit(2);
            }

            Stopwatch stopwatch = new Stopwatch();

            stopwatch.Start();

            UnrealTypes.Load();
            AssemblyRewriter rewriter = new AssemblyRewriter();

            if (System.Diagnostics.Debugger.IsAttached)
            {
                ManagedUnrealReflectionBase.UpdateSerializerCode();
                //RunTests(rewriter);
            }


            AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;

            foreach (string filePath in args)
            {
                Console.WriteLine($"Processing file: {filePath}");
                var success = ProcessAssembly(rewriter, filePath);
                if (!success)
                {
                    Environment.ExitCode = 3;
                }
                additionalAssemblySearchPath = null;
            }

            stopwatch.Stop();
            Console.WriteLine("AssemblyRewriter finished " + stopwatch.Elapsed);
            Console.ReadLine();
        }