mirror of
https://codeberg.org/ashley/poke.git
synced 2025-06-13 00:03:02 -04:00
owo
This commit is contained in:
parent
f431111611
commit
72143fede3
100 changed files with 12438 additions and 0 deletions
31
core/LightTube/Database/LTChannel.cs
Normal file
31
core/LightTube/Database/LTChannel.cs
Normal file
|
@ -0,0 +1,31 @@
|
|||
using System.Xml;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
|
||||
namespace LightTube.Database
|
||||
{
|
||||
[BsonIgnoreExtraElements]
|
||||
public class LTChannel
|
||||
{
|
||||
public string ChannelId;
|
||||
public string Name;
|
||||
public string Subscribers;
|
||||
public string IconUrl;
|
||||
|
||||
public XmlNode GetXmlElement(XmlDocument doc)
|
||||
{
|
||||
XmlElement item = doc.CreateElement("Channel");
|
||||
item.SetAttribute("id", ChannelId);
|
||||
item.SetAttribute("subscribers", Subscribers);
|
||||
|
||||
XmlElement title = doc.CreateElement("Name");
|
||||
title.InnerText = Name;
|
||||
item.AppendChild(title);
|
||||
|
||||
XmlElement thumbnail = doc.CreateElement("Avatar");
|
||||
thumbnail.InnerText = IconUrl;
|
||||
item.AppendChild(thumbnail);
|
||||
|
||||
return item;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue