Further adventures in XML serialization. W00t!
[mono.git] / mcs / doctools / src / Core / StructDoc.cs
1 // StructDoc.cs\r
2 // John Barnette (jbarn@httcb.net)\r
3 // \r
4 // Copyright (c) 2002 John Barnette\r
5 //\r
6 // This file is part of Monodoc, a multilingual API documentation tool.\r
7 //\r
8 // Monodoc is free software; you can redistribute it and/or modify\r
9 // it under the terms of the GNU General Public License as published by\r
10 // the Free Software Foundation; either version 2 of the License, or\r
11 // (at your option) any later version.\r
12 // \r
13 // Monodoc is distributed in the hope that it will be useful,\r
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of\r
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
16 // GNU General Public License for more details.\r
17 // \r
18 // You should have received a copy of the GNU General Public License\r
19 // along with Monodoc; if not, write to the Free Software\r
20 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
21 \r
22 using System;\r
23 using System.Reflection;\r
24 using System.Xml.Serialization;\r
25 \r
26 namespace Mono.Doc.Core\r
27 {\r
28         [XmlType(TypeName = "struct")]\r
29         public class StructDoc : AbstractClassStructDoc\r
30         {\r
31                 public StructDoc(string name) : base(name)\r
32                 {\r
33                 }\r
34 \r
35                 public StructDoc() : this(string.Empty)\r
36                 {\r
37                 }\r
38 \r
39                 public StructDoc(Type t, AssemblyLoader loader) : base(t, loader)\r
40                 {\r
41                         if (!AssemblyLoader.IsStruct(t))\r
42                         {\r
43                                 throw new ArgumentException("Structdoc Type must be a struct.", "t");\r
44                         }\r
45                 }\r
46         }\r
47 }\r