Exemple #1
0
        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);
            }
        }
Exemple #3
0
 public string GetProperty(RssItemProperties property)
 {
     return(this._properties.GetValueOrDefault(property, string.Empty));
 }