public static ITaskService Create() { XFileTaskService taskService = new XFileTaskService(); taskService.Initialize(); return(taskService); }
[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); }
public static ITaskService Create() { XFileTaskService taskService = new XFileTaskService(); taskService.Initialize(); return taskService; }