示例#1
0
        public static ITaskService Create()
        {
            XFileTaskService taskService = new XFileTaskService();

            taskService.Initialize();
            return(taskService);
        }
示例#2
0
        [STAThread] // Need to be STA to use OLE (clipboard) and WPF
        static int Main(string[] args)
        {
            ExitCode result = ExitCode.GeneralFailure;

            CommandLineParser parser = new CommandLineParser(FlexServiceProvider.Services.GetService <IFileService>());

            parser.Parse(args);

            IArgumentProvider argumentProvider = ArgumentSettingsProvider.Create(parser, FlexServiceProvider.Services.GetService <IConfigurationManager>(), FlexServiceProvider.Services.GetService <IFileService>());

            using (ITaskService taskService = XFileTaskService.Create())
            {
                ConsoleTaskExecution execution = new ConsoleTaskExecution(argumentProvider, taskService.TaskRegistry);
                result = execution.ExecuteTask();
            }

            return((int)result);
        }
示例#3
0
 public static ITaskService Create()
 {
     XFileTaskService taskService = new XFileTaskService();
     taskService.Initialize();
     return taskService;
 }