Beispiel #1
0
        protected override void OnStart(string[] args)
        {
            if (_serviceHost != null)
            {
                _serviceHost.Close();
            }
            _serviceHost = CustomServiceHost.CreateCustomServiceHost(_serviceHost, typeof(Server.Distributor), "http://localhost:30200/", "net.tcp://localhost:30201/", "Catch", typeof(Server.IDistributor));

            _serviceHost.Open();
        }
Beispiel #2
0
        protected override void OnStart(string[] args)
        {
            if (_serviceHost != null)
            {
                _serviceHost.Close();
            }
            _service  = new AudioAnalyzer.Provider.Server.DataProvider();
            _service1 = new Server.AudioDetalis();

            _serviceHost       = CustomServiceHost.CreateCustomServiceHost(_serviceHost, _service.GetType(), "http://localhost:8023/", "net.tcp://localhost:8024/", "Catch", typeof(AudioAnalyzer.Provider.Server.Contract.IDataProvider));
            _secondServiceHost = CustomServiceHost.CreateCustomServiceHost(_secondServiceHost, _service1.GetType(), "http://localhost:8025/", "net.tcp://localhost:8026/", "AudioDetails", typeof(AudioAnalyzer.Provider.Server.Contract.IDetalis));
            _serviceHost.Open();
            _secondServiceHost.Open();
            _service.StartApplication();
        }