Ejemplo n.º 1
0
 public static void timer_Elapsed(object sender, ElapsedEventArgs e)
 {
     Console.WriteLine("### [ClearLog]:Timer Stopped ### \n");
     timer.Stop();
     Console.WriteLine("### Clearing ChatLogs... ### \n\n");
     DbLogService.ResetLog();
     Console.WriteLine("### [ClearLog]:Task Finished ### \n\n");
     schedule_Timer();
 }
Ejemplo n.º 2
0
 public void Configuration(IAppBuilder app)
 {
     app.MapSignalR();
     app.UseCookieAuthentication(new CookieAuthenticationOptions
     {
         AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
         LoginPath          = new PathString("/Login")
     });
     DbLogService.ResetLog(); // For testing purposes, comment it if you want to clear messages using timer
     ResetLogsSheduler.schedule_Timer();
 }