static void Main() { var quoteServer = new QuoteServer.QuoteServer(QuotesFileName, Port); quoteServer.Start(); Console.WriteLine("Hit return to exit"); Console.ReadLine(); quoteServer.Stop(); }
protected override void OnStart(string[] args) // Запуск службы { _quoteServer = new QuoteServer.QuoteServer( Path.Combine(AppDomain.CurrentDomain.BaseDirectory, QuotesFileName), DefaultPort); _quoteServer.Start(); }