static void InitializeContainer() { var container = new UnityContainer(); container.RegisterType <IOperations <Product>, ManageOperations <Product> >(); container.RegisterType <IRepository <Product>, GenericRepository <Product> >(); ManageOperationsProduct = container.Resolve <ManageOperations <Product> >(); }
static void Main(string[] args) { ConfigurationReader.LoadXmlConfiguration(); ControllerCommunication controllerCommunication = new ControllerCommunication(); if (args.Length > 0) { // Extension managment behavior if (args[0].ToUpper() == "CREATESCHEMA") { Console.WriteLine(controllerCommunication.createSchema()); Console.ReadLine(); } if (args[0].ToUpper() == "HELP") { Console.WriteLine("N/A"); Console.ReadLine(); } if (args[0].ToUpper() == "DELETESCHEMA") { Console.WriteLine(controllerCommunication.deleteSchema()); Console.ReadLine(); } } else { ManageOperations.LastReadInit(); EventsRetriver eventsRetriver = new EventsRetriver(); // populate a list of events to push to AppDynamics events service eventsRetriver.populate(); // Pushs events to events service controllerCommunication.publishEvent(eventsRetriver.EventsContainer); //Making sure that the text file is updated with latest time stamp ManageOperations.LastRead = DateTime.Now; } }