Exemplo n.º 1
0
        static void Main()
        {
            var quoteServer = new QuoteServer.QuoteServer(QuotesFileName, Port);

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