forked from xamarin/GoogleApisForiOSComponents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
poco.xml.cake
95 lines (72 loc) · 2.51 KB
/
poco.xml.cake
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
///////////////////////////////////////////////
// Objects used to represent a *.nuspec file //
///////////////////////////////////////////////
public class NuspecFile
{
[System.Xml.Serialization.XmlAttribute ("src")]
public string Source { get; set; }
[System.Xml.Serialization.XmlAttribute ("target")]
public string Target { get; set; }
}
[XmlRoot ("dependency")]
public class Dependency
{
[System.Xml.Serialization.XmlAttribute ("id")]
public string Id { get; set; }
[System.Xml.Serialization.XmlAttribute ("version")]
public string Version { get; set; }
}
public class Group
{
[System.Xml.Serialization.XmlAttribute ("targetFramework")]
public string TargetFramework { get; set; }
[System.Xml.Serialization.XmlElement ("dependency")]
public List<Dependency> Dependencies { get; set; }
}
[XmlRoot ("metadata")]
public class Metadata
{
[System.Xml.Serialization.XmlElement ("id")]
public string Id { get; set; }
[System.Xml.Serialization.XmlElement ("title")]
public string Title { get; set; }
[System.Xml.Serialization.XmlElement ("version")]
public string Version { get; set; }
[System.Xml.Serialization.XmlElement ("authors")]
public string Authors { get; set; }
[System.Xml.Serialization.XmlElement ("owners")]
public string Owners { get; set; }
[System.Xml.Serialization.XmlElement ("requireLicenseAcceptance", Type = typeof (bool))]
public bool RequireLicenseAcceptance { get; set; }
[System.Xml.Serialization.XmlElement ("description")]
public string Description { get; set; }
[System.Xml.Serialization.XmlElement ("copyright")]
public string Copyright { get; set; }
[System.Xml.Serialization.XmlElement ("projectUrl")]
public string ProjectUrl { get; set; }
[System.Xml.Serialization.XmlElement ("licenseUrl")]
public string LicenseUrl { get; set; }
[System.Xml.Serialization.XmlElement ("iconUrl")]
public string IconUrl { get; set; }
[System.Xml.Serialization.XmlArray ("dependencies")]
[System.Xml.Serialization.XmlArrayItem ("group")]
public List<Group> DependenciesGroups { get; set; }
}
[System.Xml.Serialization.XmlRoot ("package")]
public class Nuspec
{
[System.Xml.Serialization.XmlElement ("metadata")]
public Metadata Metadata { get; set; }
[System.Xml.Serialization.XmlArray ("files")]
[System.Xml.Serialization.XmlArrayItem ("file")]
public List<NuspecFile> Files { get; set; }
}
public class NoEncodingStreamWriter : System.IO.StreamWriter
{
public override System.Text.Encoding Encoding {
get { return null; }
}
public NoEncodingStreamWriter (string path) : base (path)
{
}
}