Example #1
0
 // Token: 0x060002D5 RID: 725 RVA: 0x00011AB4 File Offset: 0x0000FCB4
 internal static void SaveElementsUsageInfo()
 {
     try
     {
         LicenseSaturationHelper.Log.Debug("Collecting elements usage information to store in history");
         List <ModuleLicenseSaturationInfo> modulesSaturationInfo = LicenseSaturationLogic.GetModulesSaturationInfo(null);
         if (modulesSaturationInfo.Count != 0)
         {
             List <ElementLicenseSaturationInfo> elements = new List <ElementLicenseSaturationInfo>();
             modulesSaturationInfo.ForEach(delegate(ModuleLicenseSaturationInfo m)
             {
                 elements.AddRange(m.ElementList.ToArray());
             });
             ElementsUsageDAL.Save(elements);
         }
         else
         {
             LicenseSaturationHelper.Log.DebugFormat("There is no elements usage information to store in history", Array.Empty <object>());
         }
     }
     catch (Exception ex)
     {
         LicenseSaturationHelper.Log.Error("Exception running SaveElementsUsageInfo:", ex);
     }
 }
 internal static void SaveElementsUsageInfo()
 {
     try
     {
         LicenseSaturationHelper.Log.Debug((object)"Collecting elements usage information to store in history");
         List <ModuleLicenseSaturationInfo> modulesSaturationInfo = LicenseSaturationLogic.GetModulesSaturationInfo(new int?());
         if (modulesSaturationInfo.Count != 0)
         {
             List <ElementLicenseSaturationInfo> elements = new List <ElementLicenseSaturationInfo>();
             modulesSaturationInfo.ForEach((Action <ModuleLicenseSaturationInfo>)(m => elements.AddRange((IEnumerable <ElementLicenseSaturationInfo>)m.get_ElementList().ToArray())));
             ElementsUsageDAL.Save((IEnumerable <ElementLicenseSaturationInfo>)elements);
         }
         else
         {
             LicenseSaturationHelper.Log.DebugFormat("There is no elements usage information to store in history", Array.Empty <object>());
         }
     }
     catch (Exception ex)
     {
         LicenseSaturationHelper.Log.Error((object)"Exception running SaveElementsUsageInfo:", ex);
     }
 }