SharpRSS/SharpRss/Models/FeedModel.cs

38 lines
1.4 KiB
C#
Raw Normal View History

2023-05-18 01:27:11 +02:00
using System;
using ToolQit;
using ToolQit.Extensions;
2023-05-12 15:48:14 +02:00
namespace SharpRss.Models
{
public class FeedModel
2023-05-12 15:48:14 +02:00
{
public string EncodedUrl { get; set; } = string.Empty;
2023-05-24 19:27:22 +02:00
public string? Title { get; set; } = string.Empty;
2023-06-04 19:00:46 +02:00
public string? CategoryId { get; set; } = string.Empty;
2023-05-24 19:27:22 +02:00
public string? FeedType { get; set; } = string.Empty;
public string? FeedVersion { get; set; } = string.Empty;
2023-05-24 19:27:22 +02:00
public string? Description { get; set; } = string.Empty;
public string? Language { get; set; } = string.Empty;
public string? Copyright { get; set; } = string.Empty;
public DateTimeOffset? PublicationDate { get; set; }
public DateTimeOffset? LastUpdated { get; set; } = DateTimeOffset.Now;
public string[]? Categories { get; set; }
public int ItemCount { get; set; }
private string _imageUrl = string.Empty;
public string ImageUrl
{
get
{
if (_imageUrl.IsNullEmptyWhiteSpace())
_imageUrl = string.Format(Caretaker.Settings["Paths"].GetString("FaviconResolveUrl"), new Uri(SyndicationManager.DecodeUrl(EncodedUrl)).Host);
return _imageUrl;
}
set
{
if (!value.IsNullEmptyWhiteSpace())
_imageUrl = value;
}
}
2023-05-12 15:48:14 +02:00
}
}