Mon Feb 11 19:50:27 CET 2002 Paolo Molaro <lupus@ximian.com>
[mono.git] / mcs / class / corlib / System.Reflection / ReflectionTypeLoadException.cs
1 //
2 // System.Reflection.ReflectionTypeLoadException
3 //
4 // Sean MacIsaac (macisaac@ximian.com)
5 // Dunan Mak (duncan@ximian.com)
6 //
7 // (C) 2001 Ximian, Inc.
8 //
9 using System.Globalization;
10 using System.Runtime.Serialization;
11
12 namespace System.Reflection
13 {
14         [Serializable]
15         public sealed class ReflectionTypeLoadException : SystemException
16         {
17                 // Fields
18                 private Exception[] loaderExceptions;
19                 private Type[] types;
20                 
21                 // Constructors
22                 public ReflectionTypeLoadException (Type[] classes, Exception[] exceptions)
23                         : base (Locale.GetText ("The classes in the module cannot be loaded."))
24                 {
25                         loaderExceptions = exceptions;
26                         types = classes;
27                 }
28
29                 public ReflectionTypeLoadException (Type[] classes, Exception[] exceptions, string message)
30                         : base (message)
31                 {
32                         loaderExceptions = exceptions;
33                         types = classes;
34                 }
35                         
36                 // Properties
37                 public Type[] Types
38                 {
39                         get { return types; }
40                 }
41
42                 public Exception[] LoaderExceptions
43                 {
44                         get { return loaderExceptions; }
45                 }
46
47                 // Method
48                 [MonoTODO]
49                 //
50                 // This one is a bit tough because need to serialize two arrays.
51                 // The serialization output comes out as
52                 // <Types href="#ref-4" /> 
53                 // <Exceptions href="#ref-5" />
54                 // and then goes on and appends new SOAP-ENCs, etc...
55                 //
56                 public override void GetObjectData (SerializationInfo info, StreamingContext context)
57                 {
58                         base.GetObjectData (info, context);
59                 }
60         
61         }
62 }