// -----------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// -----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Security.Permissions;
using Microsoft.Internal;
namespace System.ComponentModel.Composition
{
///
/// The exception that is thrown when one or more recoverable errors occur during
/// composition which results in those changes being rejected.
///
[Serializable]
public class ChangeRejectedException : CompositionException
{
///
/// Initializes a new instance of the class.
///
public ChangeRejectedException()
: this((string)null, (Exception)null)
{
}
///
/// Initializes a new instance of the class.
///
public ChangeRejectedException(string message)
: this(message, (Exception)null)
{
}
///
/// Initializes a new instance of the class.
///
public ChangeRejectedException(string message, Exception innerException)
: base(message, innerException, (IEnumerable)null)
{
}
///
/// Initializes a new instance of the class.
///
/// List of errors that occured while applying the changes.
public ChangeRejectedException(IEnumerable errors)
: base((string)null, (Exception)null, errors)
{
}
///
/// Gets a message that describes the exception.
///
///
/// A containing a message that describes the
/// .
///
public override string Message
{
get
{
return string.Format(CultureInfo.CurrentCulture,
Strings.CompositionException_ChangesRejected,
base.Message);
}
}
}
}