Exemplo n.º 1
0
 private void WritePredsToDB()
 {
     try
     {
         using (HeroesWebStatDataContext heroesWebStatDataContext = new HeroesWebStatDataContext
         {
             ObjectTrackingEnabled = false
         })
         {
             heroesWebStatDataContext.AddServiceReporterSession(new int?(this.GameCode), new int?(this.ServerCode), this.MachineIP, this.Category, this.SessionID);
         }
     }
     catch (Exception ex)
     {
         Log <ServiceReporter> .Logger.Error(ex);
     }
 }
Exemplo n.º 2
0
 private void ReportDataToDB(IEnumerable <object[]> data)
 {
     if (true)
     {
         try
         {
             try
             {
                 using (HeroesWebStatDataContext heroesWebStatDataContext = new HeroesWebStatDataContext())
                 {
                     foreach (object[] current in data)
                     {
                         int      value  = (int)current[0];
                         DateTime value2 = (DateTime)current[1];
                         string   text   = (string)current[2];
                         string   key    = (string)current[3];
                         string   value3 = Convert.ToString(current[4]);
                         if (text == "Logging")
                         {
                             heroesWebStatDataContext.AddServiceReporterLog(this.SessionID, new int?(value), new DateTime?(value2), text, key, value3);
                         }
                         else
                         {
                             heroesWebStatDataContext.AddServiceReporterIndicator(this.SessionID, new int?(value), new DateTime?(value2), text, key, value3);
                         }
                     }
                 }
             }
             catch (Exception ex)
             {
                 Log <ServiceReporter> .Logger.Error(ex);
             }
         }
         catch (Exception)
         {
         }
         finally
         {
         }
     }
 }