/* ****************************************************************************
*
* Copyright (c) Microsoft Corporation.
*
* This source code is subject to terms and conditions of the Apache License, Version 2.0. A
* copy of the license can be found in the License.html file at the root of this distribution. If
* you cannot locate the Apache License, Version 2.0, please send an email to
* dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
* by the terms of the Apache License, Version 2.0.
*
* You must not remove this notice, or any other, from this software.
*
*
* ***************************************************************************/
using System;
using System.Diagnostics;
using System.Dynamic.Utils;
#if SILVERLIGHT // Stubs
// This is needed so we can build Silverlight version on Codeplex
// where System.Core namespace is not defined.
namespace System.Core
{
class Dummy { }
}
namespace System {
///
/// An application exception.
///
public class ApplicationException : Exception {
private const int error = unchecked((int)0x80131600);
///
/// The constructor.
///
public ApplicationException()
: base("Application Exception") {
HResult = error;
}
///
/// The constructor.
///
/// The message.
public ApplicationException(string message)
: base(message) {
HResult = error;
}
///
/// The constructor.
///
/// The message.
/// The inner exception.
public ApplicationException(string message, Exception innerException)
: base(message, innerException) {
HResult = error;
}
}
namespace Runtime.InteropServices {
///
/// The Default Parameter Value Attribute.
///
public sealed class DefaultParameterValueAttribute : Attribute {
///
/// The constructor
///
/// The value.
public DefaultParameterValueAttribute(object value) { }
}
}
// We reference these namespaces via "using"
// We don't actually use them because the code is #if !SILVERLIGHT
// Rather than fix the usings all over the place, just define these here
namespace Runtime.Remoting { class Dummy {} }
namespace Security.Policy { class Dummy {} }
namespace Xml.XPath { class Dummy {} }
namespace Reflection {
///
/// PortableExecutableKinds enum.
///
public enum PortableExecutableKinds {
///
/// ILOnly
///
ILOnly = 0
}
///
/// ImageFileMachine enum.
///
public enum ImageFileMachine {
///
/// I386
///
I386 = 1
}
}
namespace ComponentModel {
///
/// The Warning exception.
///
public class WarningException : SystemException {
///
/// The constructor.
///
/// The message.
public WarningException(string message) : base(message) { }
}
}
///
/// The serializable attribute.
///
public class SerializableAttribute : Attribute {
}
///
/// Non serializable attribute.
///
public class NonSerializedAttribute : Attribute {
}
namespace Runtime.Serialization {
///
/// ISerializable interface.
///
public interface ISerializable {
}
}
///
/// The ConsoleColor enum.
///
public enum ConsoleColor {
///
/// Black.
///
Black = 0,
///
/// DarkBlue.
///
DarkBlue = 1,
///
/// DarkGreen.
///
DarkGreen = 2,
///
/// DaryCyan.
///
DarkCyan = 3,
///
/// DarkRed
///
DarkRed = 4,
///
/// DarkMagenta
///
DarkMagenta = 5,
///
/// DarkYellow
///
DarkYellow = 6,
///
/// Gray
///
Gray = 7,
///
/// DarkGray
///
DarkGray = 8,
///
/// Blue
///
Blue = 9,
///
/// Green
///
Green = 10,
///
/// Cyan
///
Cyan = 11,
///
/// Red
///
Red = 12,
///
/// Magenta
///
Magenta = 13,
///
/// Yellow
///
Yellow = 14,
///
/// White
///
White = 15,
}
}
#endif