Xaye.Fred.Fred.CreateSource C# (CSharp) Méthode

CreateSource() private méthode

private CreateSource ( System.Xml.Linq.XElement element ) : Source
element System.Xml.Linq.XElement
Résultat Source
        private Source CreateSource(XElement element)
        {
            return new Source(this)
            {
                Id = int.Parse(element.Attribute("id").Value),
                Name = element.Attribute("name").Value,
                Link = element.Attribute("link") != null
                    ? element.Attribute("link").Value
                    : Empty,
                RealtimeStart = element.Attribute("realtime_start").Value.ToFredDate(),
                RealtimeEnd = element.Attribute("realtime_end").Value.ToFredDate(),
                Notes = element.Attribute("notes") != null
                    ? element.Attribute("notes").Value
                    : Empty
            };
        }