forked from vieapps/Components.Utility.Epub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManifest.cs
More file actions
29 lines (24 loc) · 726 Bytes
/
Manifest.cs
File metadata and controls
29 lines (24 loc) · 726 Bytes
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
#region Related components
using System;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Collections.Generic;
#endregion
namespace net.vieapps.Components.Utility.Epub
{
class Manifest
{
XElement _element;
internal Manifest() => this._element = new XElement(Document.OpfNS + "manifest");
internal void AddItem(string id, string href, string type)
{
var item = new XElement(Document.OpfNS + "item");
item.SetAttributeValue("id", id);
item.SetAttributeValue("href", href);
item.SetAttributeValue("media-type", type);
this._element.Add(item);
}
internal XElement ToElement() => this._element;
}
}