2using System.Collections.Generic;
3using System.Threading.Tasks;
26 private string url =
string.Empty;
45 return Task.FromResult(
false);
63 [ToolTip(4,
"Link to RSS Feed.")]
64 [DefaultValueStringEmpty]
69 set => this.url = value;
80 LinkedList<Parameter> Result = await base.GetDisplayableParametersAsync(
Language, Caller) as LinkedList<Parameter>;
100 if (!Uri.TryCreate(
this.url, UriKind.Absolute, out Uri
Link))
101 throw new Exception(
"Invalid URL.");
108 if (Obj is XmlDocument Xml)
111 throw new Exception(
"URL did not return an RSS document.");
114 DateTime Now = DateTime.UtcNow;
115 List<Field> Fields =
new List<Field>();
119 DateTime Publication = Now;
121 if (Fields.Count > 0)
127 if (!
string.IsNullOrEmpty(Channel.
Title))
130 if (!(Channel.
Link is
null))
136 if (!
string.IsNullOrEmpty(Channel.
Language))
139 if (!
string.IsNullOrEmpty(Channel.
Copyright))
145 if (!
string.IsNullOrEmpty(Channel.
WebMaster))
154 if (!
string.IsNullOrEmpty(Channel.
Generator))
168 string s =
"Channel, Category " + (++i).
ToString();
172 if (!(Category.
Domain is
null))
177 if (!(Channel.
Image is
null))
182 if (!
string.IsNullOrEmpty(Channel.
Image.
Title))
198 if (!(Channel.
Items is
null))
207 if (!
string.IsNullOrEmpty(Item.
Title))
210 if (!(Item.
Link is
null))
216 if (!
string.IsNullOrEmpty(Item.
Author))
222 if (!(Item.
Guid is
null))
228 if (!(Item.
Source is
null))
255 string s =
"Category " + (++i).
ToString();
259 if (!(Category.
Domain is
null))
267 if (!(Doc.Warnings is
null) && Doc.Warnings.Length > 0)
269 List<ThingError> Errors =
new List<ThingError>();
Static class managing encoding and decoding of internet content.
static Task< object > GetAsync(Uri Uri, params KeyValuePair< string, string >[] Headers)
Gets a resource, given its URI.
Static class managing the runtime environment of the IoT Gateway.
static X509Certificate2 Certificate
Domain certificate.
Contains information about a language.
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
Node representing an IP Host machine.
override string ToString()
Class for the root node of the Metering topology.
Base class for all provisioned metering nodes.
Tokens available in request.
Represents a boolean value that can be either true or false.
Represents a date and optional time value.
Represents a 64-bit integer value.
Represents a string value.
Represents a time value. Time values adhere to the type specified by xsd:time.
Contains information about an error on a thing
Virtual node, that can be used as a placeholder for services.
Interface for nodes that are published through the concentrator interface.
INode Parent
Parent Node, or null if a root node.
Interface for sensor nodes.
Interface for classes managing sensor data readouts.
Task ReportErrors(bool Done, params ThingError[] Errors)
Report error states to the client.
Task ReportFields(bool Done, params Field[] Fields)
Report read fields to the client.
FieldQoS
Field Quality of Service flags
FieldType
Field Type flags