1
// -----------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 // -----------------------------------------------------------------------
5 using System
.Collections
.Generic
;
6 using System
.Globalization
;
7 using System
.Security
.Permissions
;
8 using Microsoft
.Internal
;
10 namespace System
.ComponentModel
.Composition
13 /// The exception that is thrown when one or more recoverable errors occur during
14 /// composition which results in those changes being rejected.
17 public class ChangeRejectedException
: CompositionException
20 /// Initializes a new instance of the <see cref="ChangeRejectedException"/> class.
22 public ChangeRejectedException()
23 : this((string)null, (Exception
)null)
28 /// Initializes a new instance of the <see cref="ChangeRejectedException"/> class.
30 public ChangeRejectedException(string message
)
31 : this(message
, (Exception
)null)
36 /// Initializes a new instance of the <see cref="ChangeRejectedException"/> class.
38 public ChangeRejectedException(string message
, Exception innerException
)
39 : base(message
, innerException
, (IEnumerable
<CompositionError
>)null)
44 /// Initializes a new instance of the <see cref="ChangeRejectedException"/> class.
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
)
53 /// Gets a message that describes the exception.
56 /// A <see cref="String"/> containing a message that describes the
57 /// <see cref="ChangeRejectedException"/>.
59 public override string Message
63 return string.Format(CultureInfo
.CurrentCulture
,
64 Strings
.CompositionException_ChangesRejected
,