+++ /dev/null
-// -----------------------------------------------------------------------\r
-// Copyright (c) Microsoft Corporation. All rights reserved.\r
-// -----------------------------------------------------------------------\r
-using System;\r
-using System.Runtime.Serialization;\r
-\r
-namespace System.ComponentModel.Composition\r
-{\r
- /// <summary>\r
- /// The exception that is thrown when the underlying exported value or metadata of an \r
- /// <see cref="Lazy{T}"/> or <see cref="Lazy{T, TMetadataView}"/> object cannot be \r
- /// cast to <c>T</c> or <c>TMetadataView</c>, respectively.\r
- /// </summary>\r
- [Serializable]\r
- public class CompositionContractMismatchException : Exception\r
- {\r
- /// <summary>\r
- /// Initializes a new instance of the <see cref="CompositionContractMismatchException"/> class.\r
- /// </summary>\r
- public CompositionContractMismatchException()\r
- : this((string)null, (Exception)null)\r
- {\r
- }\r
-\r
- /// <summary>\r
- /// Initializes a new instance of the <see cref="CompositionContractMismatchException"/> class \r
- /// with the specified error message.\r
- /// </summary>\r
- /// <param name="message">\r
- /// A <see cref="String"/> containing a message that describes the \r
- /// <see cref="CompositionContractMismatchException"/>; or <see langword="null"/> to set\r
- /// the <see cref="Exception.Message"/> property to its default value.\r
- /// </param>\r
- public CompositionContractMismatchException(string message)\r
- : this(message, (Exception)null)\r
- {\r
- }\r
-\r
- /// <summary>\r
- /// Initializes a new instance of the <see cref="CompositionContractMismatchException"/> class \r
- /// with the specified error message and exception that is the cause of the \r
- /// exception.\r
- /// </summary>\r
- /// <param name="message">\r
- /// A <see cref="String"/> containing a message that describes the \r
- /// <see cref="CompositionContractMismatchException"/>; or <see langword="null"/> to set\r
- /// the <see cref="Exception.Message"/> property to its default value.\r
- /// </param>\r
- /// <param name="innerException">\r
- /// The <see cref="Exception"/> that is the underlying cause of the \r
- /// <see cref="CompositionContractMismatchException"/>; or <see langword="null"/> to set\r
- /// the <see cref="Exception.InnerException"/> property to <see langword="null"/>.\r
- /// </param>\r
- public CompositionContractMismatchException(string message, Exception innerException)\r
- : base(message, innerException)\r
- {\r
- }\r
-\r
-#if !SILVERLIGHT\r
-\r
- /// <summary>\r
- /// Initializes a new instance of the <see cref="CompositionContractMismatchException"/> class \r
- /// with the specified serialization data.\r
- /// </summary>\r
- /// <param name="info">\r
- /// The <see cref="SerializationInfo"/> that holds the serialized object data about the \r
- /// <see cref="CompositionContractMismatchException"/>.\r
- /// </param>\r
- /// <param name="context">\r
- /// The <see cref="StreamingContext"/> that contains contextual information about the \r
- /// source or destination.\r
- /// </param>\r
- /// <exception cref="ArgumentNullException">\r
- /// <paramref name="info"/> is <see langword="null"/>.\r
- /// </exception>\r
- /// <exception cref="SerializationException">\r
- /// <paramref name="info"/> is missing a required value.\r
- /// </exception>\r
- /// <exception cref="InvalidCastException">\r
- /// <paramref name="info"/> contains a value that cannot be cast to the correct type.\r
- /// </exception>\r
- [System.Security.SecuritySafeCritical]\r
- protected CompositionContractMismatchException(SerializationInfo info, StreamingContext context)\r
- : base(info, context)\r
- {\r
- }\r
-\r
-#endif\r
- }\r
-}
\ No newline at end of file