Exemplo n.º 1
0
        private static void Driver_StateChanged(object sender, Driver.EventArg.StateChangedEventArgs e)
        {
            Application application = GetApplication(e.Application).Result;

            TimeCatDB.Instance.InsertAsync(new Activity()
            {
                Action        = e.StateType,
                ApplicationId = application.Id,
                Time          = DateTimeOffset.UtcNow
            }).Wait();

            Log.Information("[{ActionType}] {ApplicationName}", e.StateType, e.Application.FullName);
        }
Exemplo n.º 2
0
 private static void Driver_StateChanged(object sender, Driver.EventArg.StateChangedEventArgs e)
 {
     Log.Information("[{ActionType}] {ApplicationName}", e.StateType, e.Application.FullName);
 }