FlushBuffers() public method

Flushs the buffers to disk.
public FlushBuffers ( ) : void
return void
Exemplo n.º 1
0
 override internal void OnApplicationPause(bool pauseStatus)
 {
     if (pauseStatus)
     {
         lastActive = DateTime.UtcNow;
         eventStore.FlushBuffers();
     }
     else
     {
         var backgroundSeconds = (DateTime.UtcNow - lastActive).TotalSeconds;
         if (backgroundSeconds > Settings.SessionTimeoutSeconds)
         {
             lastActive = DateTime.MinValue;
             NewSession();
         }
     }
 }
Exemplo n.º 2
0
 override internal void OnApplicationPause(bool pauseStatus)
 {
     if (pauseStatus)
     {
         lastActive = DateTime.UtcNow;
         eventStore.FlushBuffers();
         engageCache.Save();
     }
     else
     {
         var backgroundSeconds = (DateTime.UtcNow - lastActive).TotalSeconds;
         if (backgroundSeconds > Settings.SessionTimeoutSeconds)
         {
             lastActive    = DateTime.MinValue;
             retryAttempts = 0;
             NewSession();
             if (Settings.SendGameRunningEveryMinute)
             {
                 RecordGameRunningEvent();
             }
         }
     }
 }