erminas.SmartAPI.CMS.Locale.GetFormats C# (CSharp) Method

GetFormats() private method

private GetFormats ( ) : List
return List
        private List<IDateTimeFormat> GetFormats()
        {
            List<IDateTimeFormat> dateEntries =
                (from XmlElement curEntry in GetFormatsOfSingleType(DateTimeFormatTypes.Date)
                 select
                     (IDateTimeFormat)
                     new DateTimeFormat(DateTimeFormatTypes.Date | DateTimeFormatTypes.DateTime, curEntry)).ToList();

            IEnumerable<DateTimeFormat> timeEntries =
                from XmlElement curEntry in GetFormatsOfSingleType(DateTimeFormatTypes.Time)
                select new DateTimeFormat(DateTimeFormatTypes.Time, curEntry);

            IEnumerable<DateTimeFormat> dateTimeEntries =
                from XmlElement curEntry in GetFormatsOfSingleType(DateTimeFormatTypes.DateTime)
                let entry = new DateTimeFormat(DateTimeFormatTypes.DateTime, curEntry)
                where dateEntries.All(x => x.TypeId != entry.TypeId)
                select entry;

            return dateEntries.Union(timeEntries).Union(dateTimeEntries).ToList();
        }