Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
UPnPIcon.cs
1
using
System
;
2
using
System.Collections.Generic
;
3
using
System.Text;
4
using
System.Xml;
5
6
namespace
Waher.Networking.UPnP
7
{
11
public
class
UPnPIcon
12
{
13
private
readonly XmlElement xml;
14
private
readonly
Uri
uri;
15
private
readonly
string
mimetype;
16
private
readonly
string
url;
17
private
readonly
int
width;
18
private
readonly
int
height;
19
private
readonly
int
depth;
20
21
internal
UPnPIcon
(XmlElement
Xml
,
Uri
BaseUri)
22
{
23
this.xml =
Xml
;
24
25
foreach
(XmlNode N
in
Xml
.ChildNodes)
26
{
27
switch
(N.LocalName)
28
{
29
case
"mimetype"
:
30
this.mimetype = N.InnerText;
31
break
;
32
33
case
"width"
:
34
this.width =
int
.Parse(N.InnerText);
35
break
;
36
37
case
"height"
:
38
this.height =
int
.Parse(N.InnerText);
39
break
;
40
41
case
"depth"
:
42
this.depth =
int
.Parse(N.InnerText);
43
break
;
44
45
case
"url"
:
46
this.url = N.InnerText;
47
this.uri =
new
Uri
(BaseUri, this.url);
48
break
;
49
}
50
}
51
}
52
56
public
XmlElement
Xml
=> this.xml;
57
61
public
Uri
Uri
=> this.uri;
62
66
public
string
Mimetype
=> this.mimetype;
67
71
public
string
Url
=> this.url;
72
76
public
int
Width
=> this.width;
77
81
public
int
Height
=> this.height;
82
86
public
int
Depth
=> this.depth;
87
89
public
override
string
ToString
()
90
{
91
return
this.url;
92
}
93
}
94
}
Waher.Networking.UPnP.UPnPIcon
Contains information about an icon.
Definition:
UPnPIcon.cs:12
Waher.Networking.UPnP.UPnPIcon.Width
int Width
Width of icon
Definition:
UPnPIcon.cs:76
Waher.Networking.UPnP.UPnPIcon.Mimetype
string Mimetype
Internet Content Type
Definition:
UPnPIcon.cs:66
Waher.Networking.UPnP.UPnPIcon.Height
int Height
Height of icon
Definition:
UPnPIcon.cs:81
Waher.Networking.UPnP.UPnPIcon.Url
string Url
URL to image
Definition:
UPnPIcon.cs:71
Waher.Networking.UPnP.UPnPIcon.Depth
int Depth
Color depth of icon
Definition:
UPnPIcon.cs:86
Waher.Networking.UPnP.UPnPIcon.ToString
override string ToString()
Definition:
UPnPIcon.cs:89
Waher.Networking.UPnP.UPnPIcon.Xml
XmlElement Xml
Underlying XML definition.
Definition:
UPnPIcon.cs:56
Waher.Networking.UPnP.UPnPIcon.Uri
Uri Uri
URI to image
Definition:
UPnPIcon.cs:61
System.Collections.Generic
Definition:
ImplTypes.g.cs:4970
System
Definition:
Adapters.g.cs:58
Waher.Networking.UPnP
Definition:
DeviceDescriptionDocument.cs:7
IoTGateway
Networking
Waher.Networking.UPnP
UPnPIcon.cs
Generated by
1.9.5