示例#1
0
文件: Class1.cs 项目: alannet/example
 static void Main(string[] args)
 {
     QuoteServer qs = new QuoteServer(@"c:\ProCSharp\WinServices\quotes.txt", 4567);
     qs.Start();
     Console.WriteLine("Hit return to exit");
     Console.ReadLine();
     qs.Stop();
 }
        public static void Main()
        {
            var qs = new QuoteServer("quotes.txt", 4567);
            qs.Start();
            WriteLine("Hit return to exit");
            ReadLine();
            qs.Stop();

        }
示例#3
0
        static void Main(string[] args)
        {
            QuoteServer qs = new QuoteServer(@"c:\ProCSharp\WinServices\quotes.txt", 4567);

            qs.Start();
            Console.WriteLine("Hit return to exit");
            Console.ReadLine();
            qs.Stop();
        }
    protected override void OnStart(string[] args)
    {
      quoteServer = new QuoteServer(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, QUOTESFILE), 5678);
      quoteServer.Start();

    }
 protected override void OnStart(string[] args)
 {
     quoteServer = new QuoteServer(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "quotes.txt"), 5678);
     quoteServer.Start();
 }
示例#6
0
 /// <summary>
 /// Set things in motion so your service can do its work.
 /// </summary>
 protected override void OnStart(string[] args)
 {
     quoteServer = new QuoteServer(@"C:\ProCSharp\WinServices\quotes.txt", 5678);
     quoteServer.Start();
 }
示例#7
0
 /// <summary>
 /// Set things in motion so your service can do its work.
 /// </summary>
 protected override void OnStart(string[] args)
 {
     quoteServer = new QuoteServer(@"C:\ProCSharp\WinServices\quotes.txt", 5678);
     quoteServer.Start();
 }