public UnitModel GetUnitInfo() { var LimitOfDiskSpase = doc.Root.Elements().Where(e => e.Name == "LimitOfDiskSpase").First().Value; Char separator = System.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator[0]; var Unit = new UnitModel { LimitOfDiskSpase = Convert.ToDouble(LimitOfDiskSpase.Replace( ',' , separator)), LimitOfParsingEmails = Convert.ToInt32(doc.Root.Elements().Where(e => e.Name == "LimitOfParsingEmails").First().Value), Redactors = Convert.ToInt32(doc.Root.Elements().Where(e => e.Name == "Redactors").First().Value) }; return Unit; }
public UnitsHelper() { UnitInfo = GetUnitInfo(); }