Merge pull request #3442 from lateralusX/jlorenss/win-atexit-commands
[mono.git] / mcs / nunit24 / ClientUtilities / util / AssemblyItem.cs
1 // ****************************************************************\r
2 // This is free software licensed under the NUnit license. You\r
3 // may obtain a copy of the license as well as information regarding\r
4 // copyright ownership at http://nunit.org/?p=license&r=2.4.\r
5 // ****************************************************************\r
6 \r
7 using System;\r
8 using System.Threading;\r
9 using System.Xml.Serialization;\r
10 \r
11 namespace NUnit.Util\r
12 {\r
13         /// <summary>\r
14         /// Holds an assembly path and other information needed to\r
15         /// load an assembly. Currently there is no other info.\r
16         /// Used in serialization of NUnit projects.\r
17         /// </summary>\r
18         [Serializable]\r
19         public struct AssemblyItem\r
20         {\r
21                 [XmlAttribute]\r
22                 public string path;\r
23 \r
24                 public ApartmentState apartment;\r
25 \r
26                 public AssemblyItem( string path ) : this( path, ApartmentState.Unknown ) { }\r
27 \r
28                 public AssemblyItem( string path, ApartmentState apartment )\r
29                 {\r
30                         if ( !System.IO.Path.IsPathRooted( path ) )\r
31                                 throw new ArgumentException( "Assembly path must be absolute", "path" );\r
32                         this.path = path;\r
33                         this.apartment = apartment;\r
34                 }\r
35         }\r
36 }\r