コード例 #1
0
        protected override string GenerateCommandLineCommands()
        {
            // build command line to execute MetaDataProcessor
            CommandLineBuilder commandLinedBuilder = new CommandLineBuilder();

            // going through all possible options for MetaDataProcessor now...

            // -loadHints
            AppendLoadHints(commandLinedBuilder);

            // -load
            commandLinedBuilder.AppendSwitchForEachFile("-load", Load);

            // -loadDatabase
            commandLinedBuilder.AppendSwitchForEachFile("-loadDatabase", LoadDatabase);

            // -loadStrings
            commandLinedBuilder.AppendSwitchForFile("-loadStrings", LoadStrings);

            // -excludeClassByName
            commandLinedBuilder.AppendSwitchForEachFile("-excludeClassByName", ExcludeClassByName);

            // -parse
            commandLinedBuilder.AppendSwitchForFile("-parse", Parse);

            // -minimize
            commandLinedBuilder.AppendSwitchIfTrue("-minimize", Minimize);

            // -resolve
            commandLinedBuilder.AppendSwitchIfTrue("-resolve", Resolve);

            // -dump_exports
            commandLinedBuilder.AppendSwitchForFile("-dump_exports", DumpExports);

            // -dump_all
            commandLinedBuilder.AppendSwitchForFile("-dump_all", DumpAll);

            // -importResource
            commandLinedBuilder.AppendSwitchForEachFile("-importResource", ImportResources);

            // -compile
            commandLinedBuilder.AppendSwitchForFile("-compile", Compile);

            // -savestrings
            commandLinedBuilder.AppendSwitchForFile("-savestrings", SaveStrings);

            // -verbose
            commandLinedBuilder.AppendSwitchIfTrue("-verbose", Verbose);

            // -verboseMinimize
            commandLinedBuilder.AppendSwitchIfTrue("-verboseMinimize", VerboseMinimize);

            // -noByteCode
            commandLinedBuilder.AppendSwitchIfTrue("-noByteCode", NoByteCode);

            // -noAttributes
            commandLinedBuilder.AppendSwitchIfTrue("-noAttributes", NoAttributes);

            // -ignoreAssembly
            commandLinedBuilder.AppendSwitchForEachFile("-ignoreAssembly", IgnoreAssembly);

            // -generateStringsTable
            commandLinedBuilder.AppendSwitchForFile("-generateStringsTable", GenerateStringsTable);

            // -generate_dependency
            commandLinedBuilder.AppendSwitchForFile("-generate_dependency", GenerateDependency);

            // -create_database
            AppendCreateDatabase(commandLinedBuilder);

            // -generate_skeleton
            commandLinedBuilder.AppendSwitchToFileAndExtraSwitches("-generate_skeleton", GenerateSkeletonFile, GenerateSkeletonName, GenerateSkeletonProject, SkeletonWithoutInterop ? "TRUE" : "FALSE");

            // -refresh_assembly
            AppendRefreshAssemblyCommand(commandLinedBuilder);

            // output command line for debug?
            if (OutputCommandLine)
            {
                Log.LogWarning($"NFMDP cmd>> {GenerateFullPathToTool()} {commandLinedBuilder.ToString()} <<");
            }

            return(commandLinedBuilder.ToString());
        }