2009-07-11 Michael Barker <mike@middlesoft.co.uk>
[mono.git] / mcs / class / dlr / Runtime / Microsoft.Scripting.Core / Stubs.cs
1 /* ****************************************************************************
2  *
3  * Copyright (c) Microsoft Corporation. 
4  *
5  * This source code is subject to terms and conditions of the Microsoft Public License. A 
6  * copy of the license can be found in the License.html file at the root of this distribution. If 
7  * you cannot locate the  Microsoft Public License, please send an email to 
8  * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
9  * by the terms of the Microsoft Public License.
10  *
11  * You must not remove this notice, or any other, from this software.
12  *
13  *
14  * ***************************************************************************/
15
16 #if CODEPLEX_40
17 using System;
18 #else
19 using System; using Microsoft;
20 #endif
21 using System.Diagnostics;
22 #if CODEPLEX_40
23 using System.Dynamic.Utils;
24 #else
25 using Microsoft.Scripting.Utils;
26 #endif
27
28 #if SILVERLIGHT // Stubs
29
30 namespace System {
31
32     /// <summary>
33     /// An application exception.
34     /// </summary>
35     public class ApplicationException : Exception {
36         private const int error = unchecked((int)0x80131600);
37         /// <summary>
38         /// The constructor.
39         /// </summary>
40         public ApplicationException()
41             : base("Application Exception") {
42             HResult = error;
43         }
44
45         /// <summary>
46         /// The constructor.
47         /// </summary>
48         /// <param name="message">The message.</param>
49         public ApplicationException(string message)
50             : base(message) {
51             HResult = error;
52         }
53
54         /// <summary>
55         /// The constructor.
56         /// </summary>
57         /// <param name="message">The message.</param>
58         /// <param name="innerException">The inner exception.</param>
59         public ApplicationException(string message, Exception innerException)
60             : base(message, innerException) {
61             HResult = error;
62         }
63     }
64
65     namespace Runtime.InteropServices {
66         /// <summary>
67         /// The Default Parameter Value Attribute.
68         /// </summary>
69         public sealed class DefaultParameterValueAttribute : Attribute {
70             /// <summary>
71             /// The constructor
72             /// </summary>
73             /// <param name="value">The value.</param>
74             public DefaultParameterValueAttribute(object value) { }
75         }
76     }
77
78     // We reference these namespaces via "using"
79     // We don't actually use them because the code is #if !SILVERLIGHT
80     // Rather than fix the usings all over the place, just define these here
81     namespace Runtime.Remoting { class Dummy {} }
82     namespace Security.Policy { class Dummy {} }
83     namespace Xml.XPath { class Dummy {} }
84
85     namespace Reflection {
86         /// <summary>
87         /// PortableExecutableKinds enum.
88         /// </summary>
89         public enum PortableExecutableKinds {
90             /// <summary>
91             /// ILOnly
92             /// </summary>
93             ILOnly = 0
94         }
95
96         /// <summary>
97         /// ImageFileMachine enum.
98         /// </summary>
99         public enum ImageFileMachine {
100             /// <summary>
101             /// I386
102             /// </summary>
103             I386 = 1
104         }
105     }
106
107     namespace ComponentModel {
108
109         /// <summary>
110         /// The Warning exception.
111         /// </summary>
112         public class WarningException : SystemException {
113             /// <summary>
114             /// The constructor.
115             /// </summary>
116             /// <param name="message">The message.</param>
117             public WarningException(string message) : base(message) { }
118         }
119     }
120
121     /// <summary>
122     /// The serializable attribute.
123     /// </summary>
124     public class SerializableAttribute : Attribute {
125     }
126
127     /// <summary>
128     /// Non serializable attribute.
129     /// </summary>
130     public class NonSerializedAttribute : Attribute {
131     }
132
133     namespace Runtime.Serialization {
134         /// <summary>
135         /// ISerializable interface.
136         /// </summary>
137         public interface ISerializable {
138         }
139     }
140
141     /// <summary>
142     /// The ConsoleColor enum.
143     /// </summary>
144     public enum ConsoleColor {
145         /// <summary>
146         /// Black.
147         /// </summary>
148         Black = 0,
149         /// <summary>
150         /// DarkBlue.
151         /// </summary>
152         DarkBlue = 1,
153         /// <summary>
154         /// DarkGreen.
155         /// </summary>
156         DarkGreen = 2,
157         /// <summary>
158         /// DaryCyan.
159         /// </summary>
160         DarkCyan = 3,
161         /// <summary>
162         /// DarkRed
163         /// </summary>
164         DarkRed = 4,
165         /// <summary>
166         /// DarkMagenta
167         /// </summary>
168         DarkMagenta = 5,
169         /// <summary>
170         /// DarkYellow
171         /// </summary>
172         DarkYellow = 6,
173         /// <summary>
174         /// Gray
175         /// </summary>
176         Gray = 7,
177         /// <summary>
178         /// DarkGray
179         /// </summary>
180         DarkGray = 8,
181         /// <summary>
182         /// Blue
183         /// </summary>
184         Blue = 9,
185         /// <summary>
186         /// Green
187         /// </summary>
188         Green = 10,
189         /// <summary>
190         /// Cyan
191         /// </summary>
192         Cyan = 11,
193         /// <summary>
194         /// Red
195         /// </summary>
196         Red = 12,
197         /// <summary>
198         /// Magenta
199         /// </summary>
200         Magenta = 13,
201         /// <summary>
202         /// Yellow
203         /// </summary>
204         Yellow = 14,
205         /// <summary>
206         /// White
207         /// </summary>
208         White = 15,
209     }
210
211 }
212
213 #endif