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