コード例 #1
0
        public static void Main(string[] args)
        {
            MSBuildLocator.RegisterDefaults();

            AbstractMFDevelopmentKit developmentKit = null;

            // Interactive command prompt
            if (args.Length == 0)
            {
                developmentKit = new CommandPromptDevelopmentKit();
            }
            // CLI
            else
            {
                developmentKit = new CLIDevelopmentKit();
            }

            developmentKit?.Run(args);

            AbstractCommandHandler commandHandler = CommandHandlerFactory.GetCommandHandler(developmentKit);

            if (commandHandler != null)
            {
                commandHandler.HandleCommand();
            }
        }
コード例 #2
0
        public static AbstractCommandHandler GetCommandHandler(AbstractMFDevelopmentKit developmentKit)
        {
            AbstractCommandHandler commandHandler = null;

            if (developmentKit.MFilesSettings == null)
            {
                return(null);
            }

            switch (developmentKit.MFilesSettings.MFDevToolCommand)
            {
            case MFDevelopmentKitCommand.New:
            case MFDevelopmentKitCommand.Update:
                commandHandler = new GeneratorHandler();
                break;

            default:             // default
                commandHandler = new DeployerHandler();
                break;
            }
            commandHandler.MFDevelopmentKit = developmentKit;

            return(commandHandler);
        }