static void Main(string[] args) { Console.WriteLine("ConferenceXP Archive Service is starting"); #region Hook us as a listner to Trace / Debug TraceListener tl = new TextWriterTraceListener(Console.Out); Trace.Listeners.Add( tl ); #endregion BaseService arc = new BaseService(); arc.Start(); Console.WriteLine("ConferenceXP Archive Service has started listening on port " + Constants.TCPListeningPort); Console.WriteLine("Press 'Q' to quit"); Console.WriteLine("----------------------------------------------------------------- \n"); while ( Console.ReadLine() != "q"); arc.Stop(); }
static void Main(string[] args) { //Language override if (Constants.UICulture != null) { try { CultureInfo ci = new CultureInfo(Constants.UICulture); System.Threading.Thread.CurrentThread.CurrentUICulture = ci; } catch { } } Console.WriteLine(Strings.CXPArchiveServiceStarting); #region Hook us as a listner to Trace / Debug TraceListener tl = new TextWriterTraceListener(Console.Out); Trace.Listeners.Add(tl); #endregion #region Trace to a file string filename = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "LOG_" + DateTime.Now.Ticks.ToString() + ".txt"); TraceListener tlf = new TextWriterTraceListener(filename); Trace.Listeners.Add(tlf); Trace.AutoFlush = true; #endregion BaseService arc = new BaseService(); arc.Start(); Console.WriteLine(string.Format(CultureInfo.CurrentCulture, Strings.CXPArchiveServiceListeningOnPort, Constants.TCPListeningPort)); Console.WriteLine(string.Format(CultureInfo.CurrentCulture, Strings.PressKeyToQuit, "q")); Console.WriteLine("-----------------------------------------------------------------\n"); while (Console.ReadLine() != "q") { ; } arc.Stop(); }
static void Main(string[] args) { Console.WriteLine("ConferenceXP Archive Service is starting"); #region Hook us as a listner to Trace / Debug TraceListener tl = new TextWriterTraceListener(Console.Out); Trace.Listeners.Add(tl); #endregion BaseService arc = new BaseService(); arc.Start(); Console.WriteLine("ConferenceXP Archive Service has started listening on port " + Constants.TCPListeningPort); Console.WriteLine("Press 'Q' to quit"); Console.WriteLine("----------------------------------------------------------------- \n"); while (Console.ReadLine() != "q") { ; } arc.Stop(); }
static void Main(string[] args) { //Language override if (Constants.UICulture != null) { try { CultureInfo ci = new CultureInfo(Constants.UICulture); System.Threading.Thread.CurrentThread.CurrentUICulture = ci; } catch { } } Console.WriteLine(Strings.CXPArchiveServiceStarting); #region Hook us as a listner to Trace / Debug TraceListener tl = new TextWriterTraceListener(Console.Out); Trace.Listeners.Add( tl ); #endregion #region Trace to a file string filename = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "LOG_" + DateTime.Now.Ticks.ToString() + ".txt"); TraceListener tlf = new TextWriterTraceListener(filename); Trace.Listeners.Add(tlf); Trace.AutoFlush = true; #endregion BaseService arc = new BaseService(); arc.Start(); Console.WriteLine(string.Format(CultureInfo.CurrentCulture, Strings.CXPArchiveServiceListeningOnPort, Constants.TCPListeningPort)); Console.WriteLine(string.Format(CultureInfo.CurrentCulture, Strings.PressKeyToQuit, "q")); Console.WriteLine("-----------------------------------------------------------------\n"); while (Console.ReadLine() != "q"); arc.Stop(); }
/// <summary> /// Stop this service. /// </summary> protected override void OnStop() { arcServ.Stop(); base.OnStop(); }