static int Main(string[] args) { TinyIoC.TinyIoCContainer container = new TinyIoC.TinyIoCContainer(); container.Register<ArgumentsModel>(new ArgumentsModel(args)); container.RegisterInterfaceImplementations("MFilesImporter.Service", TinyIoCExtensions.RegisterOptions.AsSingleton, TinyIoCExtensions.RegisterTypes.AsInterfaceTypes); container.RegisterInterfaceImplementations("MFilesImporter.Factory", TinyIoCExtensions.RegisterOptions.AsSingleton, TinyIoCExtensions.RegisterTypes.AsInterfaceTypes); var program = container.Resolve<Program>(); return program.Run(); }
static int Main(string[] args) { var container = new TinyIoC.TinyIoCContainer(); container.RegisterInterfaceImplementations("CopyOnChange"); container.RegisterInterfaceImplementations("CopyOnChange.Factory"); var program = container.Resolve<IProgram>(); try { return program.Run(args); } catch (Exception ex) { Console.WriteLine("The following error occurred:{0}{1}", Environment.NewLine, ex); return 1; } }
static int Main(string[] args) { TinyIoC.TinyIoCContainer container = new TinyIoC.TinyIoCContainer(); container.Register <ArgumentsModel>(new ArgumentsModel(args)); container.RegisterInterfaceImplementations("MFilesDeleter.Service", TinyIoCExtensions.RegisterOptions.AsSingleton, TinyIoCExtensions.RegisterTypes.AsInterfaceTypes); container.RegisterInterfaceImplementations("MFilesDeleter.Factory", TinyIoCExtensions.RegisterOptions.AsSingleton, TinyIoCExtensions.RegisterTypes.AsInterfaceTypes); try { var program = container.Resolve <Program>(); return(program.Run()); } catch (Exception ex) { Console.WriteLine(string.Format("The following error occurred:{0}{1}", ex, Environment.NewLine)); return(1); } }
static int Main(string[] args) { TinyIoC.TinyIoCContainer container = new TinyIoC.TinyIoCContainer(); container.Register<ArgumentsModel>(new ArgumentsModel(args)); container.RegisterInterfaceImplementations("MFilesDeleter.Service", TinyIoCExtensions.RegisterOptions.AsSingleton, TinyIoCExtensions.RegisterTypes.AsInterfaceTypes); container.RegisterInterfaceImplementations("MFilesDeleter.Factory", TinyIoCExtensions.RegisterOptions.AsSingleton, TinyIoCExtensions.RegisterTypes.AsInterfaceTypes); try { var program = container.Resolve<Program>(); return program.Run(); } catch (Exception ex) { Console.WriteLine(string.Format("The following error occurred:{0}{1}", ex, Environment.NewLine)); return 1; } }