update MEF to preview 9
[mcs.git] / class / System.ComponentModel.Composition / src / ComponentModel / System / ComponentModel / Composition / ChangeRejectedException.cs
blobdb81e13fbd4a695ab23070c9a4260b31c990f39e
1 // -----------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 // -----------------------------------------------------------------------
4 using System;
5 using System.Collections.Generic;
6 using System.Globalization;
7 using System.Security.Permissions;
8 using Microsoft.Internal;
10 namespace System.ComponentModel.Composition
12 /// <summary>
13 /// The exception that is thrown when one or more recoverable errors occur during
14 /// composition which results in those changes being rejected.
15 /// </summary>
16 [Serializable]
17 public class ChangeRejectedException : CompositionException
19 /// <summary>
20 /// Initializes a new instance of the <see cref="ChangeRejectedException"/> class.
21 /// </summary>
22 public ChangeRejectedException()
23 : this((string)null, (Exception)null)
27 /// <summary>
28 /// Initializes a new instance of the <see cref="ChangeRejectedException"/> class.
29 /// </summary>
30 public ChangeRejectedException(string message)
31 : this(message, (Exception)null)
35 /// <summary>
36 /// Initializes a new instance of the <see cref="ChangeRejectedException"/> class.
37 /// </summary>
38 public ChangeRejectedException(string message, Exception innerException)
39 : base(message, innerException, (IEnumerable<CompositionError>)null)
43 /// <summary>
44 /// Initializes a new instance of the <see cref="ChangeRejectedException"/> class.
45 /// </summary>
46 /// <param name="errors">List of errors that occured while applying the changes.</param>
47 public ChangeRejectedException(IEnumerable<CompositionError> errors)
48 : base((string)null, (Exception)null, errors)
52 /// <summary>
53 /// Gets a message that describes the exception.
54 /// </summary>
55 /// <value>
56 /// A <see cref="String"/> containing a message that describes the
57 /// <see cref="ChangeRejectedException"/>.
58 /// </value>
59 public override string Message
61 get
63 return string.Format(CultureInfo.CurrentCulture,
64 Strings.CompositionException_ChangesRejected,
65 base.Message);