private void DownloadCompletedCallback(byte[] data)
 {
     if (data == null)
     {
         base.ApiLog.LogWarning("Downloading of profanity data from depot failed!");
     }
     else
     {
         base.ApiLog.LogDebug("Downloading of profanity data completed");
         try
         {
             WordFilters filters = WordFilters.ParseFrom(data);
             this.m_wordFilters = filters;
         }
         catch (Exception exception)
         {
             object[] args = new object[] { exception.ToString() };
             base.ApiLog.LogWarning("Failed to parse received data into protocol buffer. Ex  = {0}", args);
         }
         if ((this.m_wordFilters == null) || !this.m_wordFilters.IsInitialized)
         {
             base.ApiLog.LogWarning("WordFilters failed to initialize");
         }
     }
 }
Ejemplo n.º 2
0
 private void DownloadCompletedCallback(byte[] data, object userContext)
 {
     if (data == null)
     {
         base.ApiLog.LogWarning("Downloading of profanity data from depot failed!");
         return;
     }
     base.ApiLog.LogDebug("Downloading of profanity data completed");
     try
     {
         WordFilters wordFilters = WordFilters.ParseFrom(data);
         this.m_wordFilters = wordFilters;
     }
     catch (Exception ex)
     {
         base.ApiLog.LogWarning("Failed to parse received data into protocol buffer. Ex  = {0}", new object[]
         {
             ex.ToString()
         });
     }
     if (this.m_wordFilters == null || !this.m_wordFilters.IsInitialized)
     {
         base.ApiLog.LogWarning("WordFilters failed to initialize");
         return;
     }
 }