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