private bool TrySendingMessage(DataPackageEnvelope nextMessage)
 {
     //IL_003d: Unknown result type (might be due to invalid IL or missing references)
     //IL_005e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0064: Expected O, but got Unknown
     try
     {
         StaticFileLogger.Current.LogEvent(GetType().Name + ".TrySendingMessage()", $"Sending message #{nextMessage.Sequence} of type: " + nextMessage.Packages[0].ColType, "", EventLogEntryType.Information);
         ClientApi        val = new ClientApi(Configuration);
         CommunicationLog communicationLog = new CommunicationLog();
         communicationLog.Request = Configuration.ApiClient.Serialize((object)nextMessage);
         DataPackageReceipt val2 = val.Push(nextMessage);
         if (val2.ServerTime.HasValue)
         {
             ServerTime = val2.ServerTime.Value;
         }
         OnResponseReceived(val2);
         communicationLog.Response = val2.ToJson();
         if (_debugDumpTraffic)
         {
             StaticFileLogger.Current.LogEvent(GetType().Name + ".TrySendingMessage()", $"    Data sent was: {communicationLog.ToString()}", "", EventLogEntryType.Information);
         }
         LatestLog = communicationLog;
         return(true);
     }
     catch (Exception ex)
     {
         StaticFileLogger.Current.LogEvent(GetType().Name + ".TrySendingMessage()", $"    Error sending message to server. Message was : {ex.Message}. Exception is: {ex.ToString()}", "", EventLogEntryType.Error);
         return(false);
     }
 }
 public ResponseFromServerEventArgs(DataPackageReceipt receipt)
 {
     Receipt = receipt;
     if (receipt.Status.HasValue)
     {
         Status = (ServerResponseStatus)receipt.Status.Value;
     }
 }
 protected void OnResponseReceived(DataPackageReceipt receipt)
 {
     if (_debugDumpTraffic)
     {
         StaticFileLogger.Current.LogEvent(GetType().Name, "OnResponseReceived()", $"Receipt: {((object)receipt).ToString()}", EventLogEntryType.Information);
     }
     this.ResponseReceived?.Invoke(this, new ResponseFromServerEventArgs(receipt));
 }