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); }
private static void Driver_StateChanged(object sender, Driver.EventArg.StateChangedEventArgs e) { Log.Information("[{ActionType}] {ApplicationName}", e.StateType, e.Application.FullName); }