1 /* ****************************************************************************
3 * Copyright (c) Microsoft Corporation.
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.
11 * You must not remove this notice, or any other, from this software.
14 * ***************************************************************************/
19 using System; using Microsoft;
21 using System.Diagnostics;
23 using System.Dynamic.Utils;
25 using Microsoft.Scripting.Utils;
28 #if SILVERLIGHT // Stubs
33 /// An application exception.
35 public class ApplicationException : Exception {
36 private const int error = unchecked((int)0x80131600);
40 public ApplicationException()
41 : base("Application Exception") {
48 /// <param name="message">The message.</param>
49 public ApplicationException(string message)
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) {
65 namespace Runtime.InteropServices {
67 /// The Default Parameter Value Attribute.
69 public sealed class DefaultParameterValueAttribute : Attribute {
73 /// <param name="value">The value.</param>
74 public DefaultParameterValueAttribute(object value) { }
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 {} }
85 namespace Reflection {
87 /// PortableExecutableKinds enum.
89 public enum PortableExecutableKinds {
97 /// ImageFileMachine enum.
99 public enum ImageFileMachine {
107 namespace ComponentModel {
110 /// The Warning exception.
112 public class WarningException : SystemException {
116 /// <param name="message">The message.</param>
117 public WarningException(string message) : base(message) { }
122 /// The serializable attribute.
124 public class SerializableAttribute : Attribute {
128 /// Non serializable attribute.
130 public class NonSerializedAttribute : Attribute {
133 namespace Runtime.Serialization {
135 /// ISerializable interface.
137 public interface ISerializable {
142 /// The ConsoleColor enum.
144 public enum ConsoleColor {