New test.
[mono.git] / mcs / class / System / System.Net.Mail / SmtpFailedRecipientException.cs
1 //
2 // System.Net.Mail.SmtpFailedRecipientException.cs
3 //
4 // Author:
5 //      John Luke (john.luke@gmail.com)
6 //
7 // Copyright (C) John Luke, 2005
8 //
9
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 // 
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 // 
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30
31 #if NET_2_0
32
33 using System;
34 using System.Collections;
35 using System.Runtime.Serialization;
36
37 namespace System.Net.Mail {
38         [Serializable]
39         public class SmtpFailedRecipientException : SmtpException, ISerializable
40         {
41                 #region Fields
42
43                 string failedRecipient;
44
45                 #endregion // Fields
46
47                 #region Constructors
48
49                 public SmtpFailedRecipientException ()
50                 {
51                 }
52
53                 public SmtpFailedRecipientException (string message) : base (message)
54                 {
55                 }
56
57                 [MonoTODO]
58                 protected SmtpFailedRecipientException (SerializationInfo serializationInfo, StreamingContext streamingContext)
59                 {
60                 }
61
62                 public SmtpFailedRecipientException (SmtpStatusCode statusCode, string failedRecipient) : base (statusCode)
63                 {
64                         this.failedRecipient = failedRecipient;
65                 }
66
67                 public SmtpFailedRecipientException (string message, Exception innerException) : base (message, innerException)
68                 {
69                 }
70
71                 public SmtpFailedRecipientException (string message, string failedRecipient, Exception innerException) : base (message, innerException)
72                 {
73                         this.failedRecipient = failedRecipient;
74                 }
75
76                 public SmtpFailedRecipientException (SmtpStatusCode statusCode, string failedRecipient, string serverResponse) : base (statusCode, serverResponse)
77                 {
78                         this.failedRecipient = failedRecipient;
79                 }
80                 
81                 #endregion // Constructors
82                 
83                 #region Properties
84
85                 public string FailedRecipient {
86                         get { return failedRecipient; }
87                 }
88
89                 #endregion // Properties
90
91                 #region Methods
92
93                 [MonoTODO]
94                 public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
95                 {
96                 }
97
98                 [MonoTODO]
99                 void ISerializable.GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
100                 {
101                 }
102
103                 #endregion // Methods
104         }
105 }
106
107 #endif // NET_2_0