-
Notifications
You must be signed in to change notification settings - Fork 73
/
RssExtension.cs
62 lines (56 loc) · 1.33 KB
/
RssExtension.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System;
using System.Xml;
using Waher.Runtime.Inventory;
namespace Waher.Content.Rss
{
/// <summary>
/// Default RSS extension class.
/// </summary>
public class RssExtension : IRssExtension
{
/// <summary>
/// Default RSS extension class.
/// </summary>
public RssExtension()
: this(null, null)
{
}
/// <summary>
/// Default RSS extension class.
/// </summary>
/// <param name="Xml">XML Definition</param>
/// <param name="BaseUri">Base URI</param>
public RssExtension(XmlElement Xml, Uri BaseUri)
{
this.Xml = Xml;
this.BaseUri = BaseUri;
}
/// <summary>
/// XML Definition
/// </summary>
public XmlElement Xml { get; }
/// <summary>
/// Base URI
/// </summary>
public Uri BaseUri { get; }
/// <summary>
/// Creates a new instance of the RSS extension.
/// </summary>
/// <param name="Xml">XML definition.</param>
/// <param name="BaseUri">Base URI.</param>
/// <returns>New RSS instance.</returns>
public IRssExtension Create(XmlElement Xml, Uri BaseUri)
{
return new RssExtension(Xml, BaseUri);
}
/// <summary>
/// How well the class supports an XML element.
/// </summary>
/// <param name="Object">XML Element being parsed.</param>
/// <returns>Support grade.</returns>
public Grade Supports(XmlElement Object)
{
return Grade.Barely;
}
}
}