public bool TryGetProperty(RssItemProperties property, out string value) { switch (property) { case RssItemProperties.Title: value = this.Title; break; case RssItemProperties.MagnetLink: value = this.MagnetLink; break; default: value = null; return(false); } return(true); }
public string Read(RssItemProperties property) { switch (property) { case RssItemProperties.Title: return(this.ReadTitle()); case RssItemProperties.Description: return(this.ReadDescription()); case RssItemProperties.PublishDate: return(this.ReadPublishDate()); case RssItemProperties.Link: return(this.ReadLink()); case RssItemProperties.MagnetLink: return(this.ReadMagnetLink()); case RssItemProperties.Category: return(this.ReadCategory()); default: return(string.Empty); } }
public string GetProperty(RssItemProperties property) { return(this._properties.GetValueOrDefault(property, string.Empty)); }