Exemple #1
0
        static void Main(string[] args)
        {
            GenericPrincipal principal = new GenericPrincipal(
                new GenericIdentity("Kabaji"), new string[] { "Administrators", "JobMtaaniAdmin" });

            Thread.CurrentPrincipal = principal;

            ObjectBase.Container = MEFLoader.Init();

            Console.WriteLine("Starting up services");
            Console.WriteLine("");

            SM.ServiceHost hostAdManager      = new SM.ServiceHost((typeof(AdManager)));
            SM.ServiceHost hostAccountManager = new SM.ServiceHost((typeof(AccountManager)));

            StartService(hostAdManager, "Ad Manager");
            StartService(hostAccountManager, "Account Manager");

            Console.WriteLine("");
            Console.WriteLine("Press [ ENTER ] to exit");
            Console.ReadLine();

            StopService(hostAdManager, "Ad Manager");
            StopService(hostAccountManager, "Account Manager");
        }
Exemple #2
0
        static void Main(string[] args)
        {
            GenericPrincipal principal = new GenericPrincipal(
                new GenericIdentity("kapilb"), new string[] { "Administrators", "CarRentalAdmin" });

            Thread.CurrentPrincipal = principal;

            ObjectBase.Container = MEFLoader.Init();


            Console.WriteLine("Starting up the service...");
            Console.WriteLine("");

            SM.ServiceHost InventoryManagerHost = new SM.ServiceHost(typeof(InventoryManager));
            SM.ServiceHost AccountManagerHost   = new SM.ServiceHost(typeof(AccountManager));
            SM.ServiceHost RentalManagerHost    = new SM.ServiceHost(typeof(RentalManager));

            ServiceHost(InventoryManagerHost, "Inventory Manager");
            ServiceHost(AccountManagerHost, "Account Manager");
            ServiceHost(RentalManagerHost, "Rental Manager");


            Console.WriteLine("");
            Console.WriteLine("Press [Enter] to exit.");
            Console.ReadLine();

            StopService(InventoryManagerHost, "Inventory Manager");
            StopService(AccountManagerHost, "Account Manager");
            StopService(RentalManagerHost, "Rental Manager");
        }
Exemple #3
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            Thread.CurrentThread.CurrentCulture   = new CultureInfo("es");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es");

            ObjectBase.Container = MEFLoader.Init(new List <ComposablePartCatalog>()
            {
                new AssemblyCatalog(Assembly.GetExecutingAssembly())
            });

            // Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;



            //  new LoginWindow().ShowDialog();
            //  new Shell().Show();
            // new ShellWindow().Show();
            //new MainWindow().Show();



            // new Shell().Show();
            //new ShellDock().Show();

            //ShellDockDesign NewWindowB = new ShellDockDesign();
            //Current.MainWindow.WindowState = WindowState.Maximized;
            // NewWindowB.Show();

            // new ShellDockDesign();
        }
        public void Initialize()
        {
            GenericPrincipal genericPrinciple = new GenericPrincipal(new GenericIdentity("kapilb"), new string[] { "CarRentalAdmin" });

            Thread.CurrentPrincipal = genericPrinciple;

            ObjectBase.Container = MEFLoader.Init();
        }
Exemple #5
0
        static void Main(string[] args)
        {
            try
            {
                //GenericPrincipal principal = new GenericPrincipal(
                //      new GenericIdentity("Osita"), new string[] { OCOApp.Security.User, OCOApp.Security.Admin });
                //Thread.CurrentPrincipal = principal;

                Console.WriteLine("\nInitializing components ...");
                ObjectBase.Container = MEFLoader.Init(); // DI: repositories and business engines

                _logger = ObjectBase.Container.GetExportedValue <IEventLogger>();
                _logger.LogToConsole = true;
                Console.WriteLine("\nComponents initialized.");
                //

                Console.WriteLine("\nBootstrapping database ...");
                MarketMinerContextBootstrapper.Init(); // initializes the MarketMinerContext
                Console.WriteLine("\nDatabase ready.");
                //

                //ConnectToSignalR();
                StartServices();
                //

                Console.WriteLine("\nMarketMiner services are started and running.");
            }
            catch (Exception ex)
            {
                string message = "\nMarketMiner.Services experienced an unhandled exception.";

                if (_logger != null)
                {
                    _logger.LogException(ex, message);
                }
                else
                {
                    Console.WriteLine("\nERROR: " + ex.Message);
                }
            }
            finally
            {
                Console.WriteLine("\nPlease press [Enter] to Exit");
                Console.ReadLine();

                // wcf
                StopService(_hostAccountManager, "AccountManager");
                StopService(_hostMetadataManager, "MetadataManager");
                StopService(_hostParticipationManager, "ParticipationManager");
                StopService(_hostSubscriptionManager, "SubscriptionManager");
                StopService(_hostStrategyManager, "StrategyManager");
                Console.WriteLine("\nServices stopped.");

                // signalr
                //_connection.Stop();
                Console.WriteLine("\nSignalR service stopped.\n");
            }
        }
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            ObjectBase.Container = MEFLoader.Init(new List <ComposablePartCatalog>()
            {
                new AssemblyCatalog(Assembly.GetExecutingAssembly())
            });
        }
Exemple #7
0
        protected override void OnStartup(StartupEventArgs e)
        {
            //TODO: consolidate with MefBootstrapper from prism!
            base.OnStartup(e);

            ObjectBase.Container = MEFLoader.Init(new List <ComposablePartCatalog>
            {
                new AssemblyCatalog(Assembly.GetExecutingAssembly())
            });

            this.ShutdownMode = ShutdownMode.OnMainWindowClose;
        }
Exemple #8
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            AggregateCatalog catalog = new AggregateCatalog();

            catalog.Catalogs.Add(new AssemblyCatalog(Assembly.GetExecutingAssembly()));

            CompositionContainer container = MEFLoader.Init(catalog.Catalogs);

            ObjectBase.Container = container;
            DependencyResolver.SetResolver(new MefDependencyResolver(container));
        }
        void Application_Start(object sender, EventArgs e)
        {
            // Code that runs on application startup
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            AggregateCatalog catalog = new AggregateCatalog();

            catalog.Catalogs.Add(new AssemblyCatalog(Assembly.GetExecutingAssembly()));
            CompositionContainer container = MEFLoader.Init(catalog.Catalogs);

            DependencyResolver.SetResolver(new MefDependencyResolver(container));
        }
Exemple #10
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            AggregateCatalog catalog = new AggregateCatalog();

            catalog.Catalogs.Add(new AssemblyCatalog(Assembly.GetExecutingAssembly()));
            CompositionContainer container = MEFLoader.Init(catalog.Catalogs);

            ObjectBase.Container = MEFLoader.Init();
        }
Exemple #11
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            ObjectBase.Container = MEFLoader.Init(new List <ComposablePartCatalog>()
            {
                new AssemblyCatalog(Assembly.GetExecutingAssembly())
            });
            eventAggregator = new EventAggregator();

            var compositionBatch = new CompositionBatch();

            compositionBatch.AddExportedValue(this.eventAggregator);

            ObjectBase.Container.Compose(compositionBatch);
        }
Exemple #12
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            AggregateCatalog catalog = new AggregateCatalog();

            catalog.Catalogs.Add(new AssemblyCatalog(Assembly.GetExecutingAssembly()));
            CompositionContainer container = MEFLoader.Init(catalog.Catalogs);

            DependencyResolver.SetResolver(new MefDependencyResolver(container));                           // view controllers
            GlobalConfiguration.Configuration.DependencyResolver = new MefAPIDependencyResolver(container); // web api controllers
        }
Exemple #13
0
        public InventoryManager()
        {
            ObjectBase.Container = MEFLoader.Init();
            ObjectBase.Container.SatisfyImportsOnce(this);
            //mapping
            Mapper.CreateMap <Product, ProductDto>();
            Mapper.CreateMap <ProductDto, Product>();
            Mapper.CreateMap <Category, CategoryDto>();
            Mapper.CreateMap <CategoryDto, Category>();

            var cfg = new Configuration();

            cfg.Configure("hibernate.cfg.xml");
            _sessionFactory = cfg.CurrentSessionContext <WcfOperationSessionContext>().BuildSessionFactory();

            ObjectBase.Container.ComposeExportedValue(_sessionFactory);
        }
Exemple #14
0
        static void Main(string[] args)
        {
            System.Console.WriteLine("Starting up services...");
            System.Console.WriteLine("");

            ObjectBase.Container = MEFLoader.Init();

            SM.ServiceHost hostProjectManager = new SM.ServiceHost(typeof(ProjectManager));

            StartService(hostProjectManager, "ProjectManager");

            System.Console.WriteLine("");
            System.Console.WriteLine("Press [Enter] to exit.");
            System.Console.ReadLine();

            StopService(hostProjectManager, "ProjectManager");
            System.Console.ReadLine();
        }
Exemple #15
0
        public App()
            : base()
        {
            try
            {
                splash.Show(TimeSpan.FromSeconds(0));
                Current.ShutdownMode           = ShutdownMode.OnExplicitShutdown;
                Dispatcher.UnhandledException += OnDispatcherUnhandledException;



                if (!Core.Common.Utils.ProcessExtentions.IsProcessOpen("WCFConsoleHost"))
                {
                    Process p = new Process();
                    p.StartInfo = new ProcessStartInfo("WCFConsoleHost.exe");
                    p.StartInfo.CreateNoWindow  = true;
                    p.StartInfo.UseShellExecute = false;
                    p.Start();
                }
                // LoginRoutine();

                ClientObjectBase.Container = MEFLoader.Init(new List <ComposablePartCatalog>()
                {
                    new AssemblyCatalog(Assembly.GetExecutingAssembly())
                });

                if (!SystemRepository.Instance.ValidateInstallation())
                {
                    MessageBox.Show("Invalid Installation");
                    Current.Shutdown();
                }


                AsycudaDocumentSetExRepository.Instance.BaseDataModelInitialize().Wait();
            }
            catch (Exception ex)
            {
                if (ex.Message.Contains("Invalid Configuration"))
                {
                    throw;
                }
                MessageBox.Show(ex.Message + "|" + ex.StackTrace);
            }
        }
        static void Main(string[] args)
        {
            ObjectBase.Container = MEFLoader.Init();

            Console.WriteLine("Starting up services");
            Console.WriteLine("");

            SM.ServiceHost hostStudentService = new SM.ServiceHost(typeof(StudentService));

            StartService(hostStudentService, "StudentService");

            Console.WriteLine("");
            Console.WriteLine("Press [Enter] to exit.");
            Console.ReadLine();

            Console.WriteLine("Reservation Monitor Stopped");

            StopService(hostStudentService, "StudentService");
        }
Exemple #17
0
        static void Main(string[] args)
        {
            GenericPrincipal principal = new GenericPrincipal(
                new GenericIdentity("Servando"),
                new string[] { "CarRentalAdmin" }
                );

            Thread.CurrentPrincipal = principal;

            ObjectBase.Container = MEFLoader.Init();

            Console.WriteLine("Starting up services...");
            Console.WriteLine("");


            SM.ServiceHost hostInventoryManager = new System.ServiceModel.ServiceHost(typeof(InventoryManager));
            SM.ServiceHost hostRentalManager    = new System.ServiceModel.ServiceHost(typeof(RentalManager));
            SM.ServiceHost hostAccountManager   = new System.ServiceModel.ServiceHost(typeof(AccountManager));

            StartService(hostInventoryManager, "InventoryManager");
            StartService(hostRentalManager, "RentalManager");
            StartService(hostAccountManager, "AccountManager");


            System.Timers.Timer timer = new System.Timers.Timer(10000);
            timer.Elapsed += Timer_Elapsed;
            timer.Start();

            Console.WriteLine("Reservation monitor started.");


            Console.WriteLine("");
            Console.WriteLine("Press [Enter] to exit.");
            Console.ReadLine();

            timer.Stop();
            Console.WriteLine("Reservation monitor stopped.");


            StopService(hostInventoryManager, "InventoryManager");
            StopService(hostRentalManager, "RentalManager");
            StopService(hostAccountManager, "AccountManager");
        }
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            logger.Info("Bom.Desktop version {0} started on {1}.",
                        Assembly.GetExecutingAssembly().GetName().Version,
                        System.Environment.MachineName);

            ObjectBase.Container = MEFLoader.Init(new List <ComposablePartCatalog>()
            {
                new AssemblyCatalog(Assembly.GetExecutingAssembly())
            });

            //ToDo remove this for production use
            //seting up user role for dev testing purposes
            GenericPrincipal principal = new GenericPrincipal(
                new GenericIdentity("DebugUser"), new string[] { "Administrators", Security.BomAdminRole });

            Thread.CurrentPrincipal = principal;
        }
        static void Main()
        {
            Security.AddGenericPrincipal();
            ObjectBase.Container = MEFLoader.Init();

            ConsoleColor defaultColor = Console.ForegroundColor;

            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine("Starting up services...");
            Console.ForegroundColor = defaultColor;
            Console.WriteLine();


            SM.ServiceHost hostInventoryManager = new SM.ServiceHost(typeof(InventoryManager));
            SM.ServiceHost hostRentalManager    = new SM.ServiceHost(typeof(RentalManager));
            SM.ServiceHost hostAccountManager   = new SM.ServiceHost(typeof(AccountManager));

            StartService(hostInventoryManager, "InventoryManager");
            StartService(hostRentalManager, "RentalManager");
            StartService(hostAccountManager, "AccountManager");

            var timer = new Timer(10000);

            timer.Elapsed += OnTimerElapsed;
            timer.Start();
            Console.WriteLine("Reservation monitor started.");

            Console.WriteLine();
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine("Press [Enter] to exit.");
            Console.ForegroundColor = defaultColor;
            Console.ReadLine();

            timer.Stop();
            Console.WriteLine("Reservation monitor stopped.");
            Console.WriteLine();

            StopService(hostInventoryManager, "InventoryManager");
            StopService(hostRentalManager, "RentalManager");
            StopService(hostAccountManager, "AccountManager");
        }
Exemple #20
0
        static void Main(string[] args)
        {
            try
            {
                FileIOPermission f2 = new FileIOPermission(FileIOPermissionAccess.Read, Environment.CurrentDirectory + "\\WaterNut-EnterpriseDB.mdf");
                f2.AddPathList(FileIOPermissionAccess.Write | FileIOPermissionAccess.Read, Environment.CurrentDirectory + "\\WaterNut-EnterpriseDB.mdf");
                FileIOPermission f3 = new FileIOPermission(FileIOPermissionAccess.Read, Environment.CurrentDirectory + "\\WaterNut-EnterpriseDB_log.ldf");
                f3.AddPathList(FileIOPermissionAccess.Write | FileIOPermissionAccess.Read, Environment.CurrentDirectory + "\\WaterNut-EnterpriseDB_log.ldf");

                BusinessObjectBase.Container = MEFLoader.Init();

                Services = BusinessObjectBase.Container.GetExportedValues <IBusinessService>().ToList();
                //container.Compose(this);


                Parallel.ForEach(Services.OfType <IBusinessService>(), service =>
                {
                    var s = new ServiceHost(service.GetType());
                    StartService(s);
                    s.Faulted += s_Faulted;
                }
                                 );



                Console.WriteLine("");
                Console.WriteLine("Press [Enter] to exit.");
                Console.ReadLine();
                Console.WriteLine("");

                //StopService(BatchServiceHost, "BatchService");
            }
            catch (Exception ex)
            {
                Debugger.Break();
                Console.WriteLine(ex.Message);
                Console.WriteLine("");
                Console.WriteLine("");
                Console.WriteLine(ex.StackTrace);
            }
        }
        static void Main(string[] args)
        {
            logger.Info("Bom.ServiceHost.Console version {0} started on {1}",
                        Assembly.GetExecutingAssembly().GetName().Version,
                        System.Environment.MachineName);

            SetDataDirectory();

            GenericPrincipal principal = new GenericPrincipal(
                new GenericIdentity("Console"), new string[] { Security.BomAdminRole });

            Thread.CurrentPrincipal = principal;

            ObjectBase.Container = MEFLoader.Init();

            Console.WriteLine("Starting up services...");
            Console.WriteLine("");

            SM.ServiceHost hostSupplierManager = new SM.ServiceHost(typeof(SupplierManager));
            SM.ServiceHost hostStockManager    = new SM.ServiceHost(typeof(StockManager));
            SM.ServiceHost hostPartManager     = new SM.ServiceHost(typeof(PartManager));
            SM.ServiceHost hostOrderManager    = new SM.ServiceHost(typeof(OrderManager));

            StartService(hostSupplierManager, "SupplierManager");
            StartService(hostStockManager, "StockManager");
            StartService(hostPartManager, "PartManager");
            StartService(hostOrderManager, "OrderManager");

            Console.WriteLine("");
            Console.WriteLine("Press [Enter] to exit.");
            Console.ReadLine();


            StopService(hostSupplierManager, "SupplierManager");
            StopService(hostStockManager, "StockManager");
            StopService(hostPartManager, "PartManager");
            StopService(hostOrderManager, "OrderManager");

            logger.Info("Bom.ServiceHost.Console exit");
        }
Exemple #22
0
        static void InitializeContainer()
        {
            DirectoryCatalog moduleCatalog = new DirectoryCatalog(ConfigurationManager.AppSettings["moduleFolder"], "*.dll");

            /// monitor the Modules folder for dlls
            _watcher                     = new FileSystemWatcher(ConfigurationManager.AppSettings["moduleFolder"], "*.dll");
            _watcher.Created            += (sender, e) => { moduleCatalog.Refresh(); };
            _watcher.Changed            += (sender, e) => { moduleCatalog.Refresh(); };
            _watcher.EnableRaisingEvents = true;

            // load Mef container
            ObjectBase.Container = MEFLoader.Init(new List <ComposablePartCatalog>()
            {
                moduleCatalog
                , new AssemblyCatalog(Assembly.GetExecutingAssembly())
                , new AssemblyCatalog(typeof(AlgorithmBase).Assembly)
                //, new DirectoryCatalog(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath))
            });

            // start the strategy algorithm if one was added
            ObjectBase.Container.ExportsChanged += (sender, e) =>
            {
                foreach (var item in e.AddedExports)
                {
                    if (item.ContractName == "MarketMiner.Algorithm.Common.Contracts.IAlgorithm")
                    {
                        Console.WriteLine(string.Format("\nNew {0} snap-in detected.", item.ContractName));

                        //ObjectBase.Container.ComposeExportedValue(item);
                        IAlgorithm algorithm = item as IAlgorithm;
                        _algorithms.Add(algorithm);

                        AsyncPump.Run(() => Task.Factory.StartNew(() => StartAlgorithm(algorithm)));
                        //Task.Factory.StartNew(() => StartAlgorithm(algorithm));
                    }
                }
            };
        }
Exemple #23
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            Thread.CurrentThread.CurrentCulture   = new CultureInfo("es");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es");

            ObjectBase.Container = MEFLoader.Init(new List <ComposablePartCatalog>()
            {
                new AssemblyCatalog(Assembly.GetExecutingAssembly())
            });

            // Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;



            //  new LoginWindow().ShowDialog();
            //new Shell().Show();
            //------> reporte de inventario telerik new Window1().Show();
            //new MainWindow().Show();



            // new Shell().Show();
            // new
            //().Show();

            GlobalModule.bytSUCURSAL = Convert.ToByte(GlobalModule.GetSetting("GrupoGuadiana", "Config", "SucursalID", String.Empty));
            GlobalModule.bytEMPRESA  = Convert.ToByte(GlobalModule.GetSetting("GrupoGuadiana", "Config", "EmpresaID", String.Empty));

            ShellDockDesign NewWindowB = new ShellDockDesign();

            //Current.MainWindow.WindowState = WindowState.Maximized;
            NewWindowB.Show();

            // new ShellDockDesign();
        }
Exemple #24
0
        static void Main(string[] args)
        {
            GenericPrincipal principal = new GenericPrincipal(
                new GenericIdentity("Kolya"), new string[] { Security.CAR_RENTAL_ADMIN }
                );

            Thread.CurrentPrincipal = principal;

            ObjectBase.Container = MEFLoader.Init();

            System.Console.WriteLine("Starting up service");
            System.Console.WriteLine("");

            SM.ServiceHost inventoryManagerHost = new SM.ServiceHost(typeof(InventoryManager));
            StartService(inventoryManagerHost, "InventoryManager");

            SM.ServiceHost accountManagerHost = new SM.ServiceHost(typeof(AccountManager));
            StartService(accountManagerHost, "AccountManager");

            SM.ServiceHost rentalManagerHost = new SM.ServiceHost(typeof(RentalManager));
            StartService(rentalManagerHost, "RentalManager");
            System.Timers.Timer timer = new System.Timers.Timer(100000);
            timer.Elapsed += OnTimerElapsed;
            timer.Start();

            System.Console.WriteLine("");
            System.Console.WriteLine("Press [Enter] to exit...");
            System.Console.ReadLine();
            timer.Stop();

            System.Console.WriteLine("Reservation monitor started");

            StopService(inventoryManagerHost, "InventoryManager");
            StopService(accountManagerHost, "AccountManager");
            StopService(rentalManagerHost, "RentalManager");
        }
 public DiasLaboralesManager()
 {
     ObjectBase.Container = MEFLoader.Init();
     ObjectBase.Container.SatisfyImportsOnce(this);
 }
Exemple #26
0
 public VacacionesManager()
 {
     ObjectBase.Container = MEFLoader.Init();
     ObjectBase.Container.SatisfyImportsOnce(this);
 }
Exemple #27
0
        static void Main(string[] args)
        {
            var a = WindowsIdentity.GetCurrent();

            // appcmd.exe set site "Default Web Site" -+bindings.[protocol='net.tcp'],bindingsInformation='808:*']

            //GenericPrincipal principal = new GenericPrincipal(
            //    new GenericIdentity("Ozan"), new string[] { "Administrators", "MovieDbAdmin" });
            //Thread.CurrentPrincipal = principal;

            Console.WriteLine("Servisler başlatılıyor...");
            Console.WriteLine("");

            ObjectBase.Container = MEFLoader.Init();

            var hostActorService            = new ServiceHost(typeof(ActorService));
            var hostCommentService          = new ServiceHost(typeof(CommentService));
            var hostDirectorService         = new ServiceHost(typeof(DirectorService));
            var hostGenreService            = new ServiceHost(typeof(GenreService));
            var hostMovieService            = new ServiceHost(typeof(MovieService));
            var hostNewsCategoryService     = new ServiceHost(typeof(NewsCategoryService));
            var hostNewsService             = new ServiceHost(typeof(NewsService));
            var hostRatingService           = new ServiceHost(typeof(RatingService));
            var hostRoleService             = new ServiceHost(typeof(RoleService));
            var hostUserListEntryService    = new ServiceHost(typeof(UserListRecordService));
            var hostUserListService         = new ServiceHost(typeof(UserListService));
            var hostUserService             = new ServiceHost(typeof(UserService));
            var hostWatchlistService        = new ServiceHost(typeof(WatchlistRecordService));
            var hostBlogPostService         = new ServiceHost(typeof(BlogPostService));
            var hostNewsMappingService      = new ServiceHost(typeof(NewsMappingService));
            var hostBlogPostCommentService  = new ServiceHost(typeof(BlogPostCommentService));
            var hostLanguageService         = new ServiceHost(typeof(LanguageService));
            var hostReviewService           = new ServiceHost(typeof(ReviewService));
            var hostPollService             = new ServiceHost(typeof(PollService));
            var hostPollVoteService         = new ServiceHost(typeof(PollVoteService));
            var hostPollVotingRecordService = new ServiceHost(typeof(PollVotingRecordService));
            var hostStateService            = new ServiceHost(typeof(StateService));
            var hostCountryService          = new ServiceHost(typeof(CountryService));
            var hostCountyService           = new ServiceHost(typeof(CountyService));

            StartService(hostNewsMappingService, hostNewsMappingService.Description.Name);
            StartService(hostBlogPostService, hostBlogPostService.Description.Name);
            StartService(hostReviewService, hostReviewService.Description.Name);
            StartService(hostPollVotingRecordService, hostPollVotingRecordService.Description.Name);
            StartService(hostPollService, hostPollService.Description.Name);
            StartService(hostPollVoteService, hostPollVoteService.Description.Name);
            StartService(hostBlogPostCommentService, hostBlogPostCommentService.Description.Name);
            StartService(hostActorService, hostActorService.Description.Name);
            StartService(hostCommentService, hostCommentService.Description.Name);
            StartService(hostDirectorService, hostDirectorService.Description.Name);
            StartService(hostGenreService, hostGenreService.Description.Name);
            StartService(hostMovieService, hostMovieService.Description.Name);
            StartService(hostLanguageService, hostLanguageService.Description.Name);
            StartService(hostNewsCategoryService, hostNewsCategoryService.Description.Name);
            StartService(hostNewsService, hostNewsService.Description.Name);
            StartService(hostRatingService, hostRatingService.Description.Name);
            StartService(hostRoleService, hostRoleService.Description.Name);
            StartService(hostUserListEntryService, hostUserListEntryService.Description.Name);
            StartService(hostUserListService, hostUserListService.Description.Name);
            StartService(hostUserService, hostUserService.Description.Name);
            StartService(hostWatchlistService, hostWatchlistService.Description.Name);
            StartService(hostStateService, hostStateService.Description.Name);
            StartService(hostCountryService, hostCountryService.Description.Name);
            StartService(hostCountyService, hostCountyService.Description.Name);

            Console.WriteLine("");
            Console.WriteLine("Çıkış için [ENTER]'a basın.");
            Console.ReadLine();

            StopService(hostNewsMappingService, hostNewsMappingService.Description.Name);
            StopService(hostBlogPostService, hostBlogPostService.Description.Name);
            StopService(hostReviewService, hostReviewService.Description.Name);
            StopService(hostPollVotingRecordService, hostPollVotingRecordService.Description.Name);
            StopService(hostPollService, hostPollService.Description.Name);
            StopService(hostPollVoteService, hostPollVoteService.Description.Name);
            StopService(hostBlogPostCommentService, hostBlogPostCommentService.Description.Name);
            StopService(hostActorService, hostActorService.Description.Name);
            StopService(hostCommentService, hostCommentService.Description.Name);
            StopService(hostDirectorService, hostDirectorService.Description.Name);
            StopService(hostGenreService, hostGenreService.Description.Name);
            StopService(hostMovieService, hostMovieService.Description.Name);
            StopService(hostLanguageService, hostLanguageService.Description.Name);
            StopService(hostNewsCategoryService, hostNewsCategoryService.Description.Name);
            StopService(hostNewsService, hostNewsService.Description.Name);
            StopService(hostRatingService, hostRatingService.Description.Name);
            StopService(hostRoleService, hostRoleService.Description.Name);
            StopService(hostUserListEntryService, hostUserListEntryService.Description.Name);
            StopService(hostUserListService, hostUserListService.Description.Name);
            StopService(hostUserService, hostUserService.Description.Name);
            StopService(hostWatchlistService, hostWatchlistService.Description.Name);
            StopService(hostStateService, hostStateService.Description.Name);
            StopService(hostCountryService, hostCountryService.Description.Name);
            StopService(hostCountyService, hostCountyService.Description.Name);
        }
 public EspecialidadManager()
 {
     ObjectBase.Container = MEFLoader.Init();
     ObjectBase.Container.SatisfyImportsOnce(this);
 }
Exemple #29
0
 public void Initialize()
 {
     ObjectBase.Container = MEFLoader.Init();
 }
 public void Initialize()
 {
     ObjectBase.Container = MEFLoader.Init();
     AppDomain.CurrentDomain.SetData("DataDirectory", System.IO.Directory.GetCurrentDirectory());
 }