[Csmail-patches] CVS: csmail/src/CSMail AssemblyInfo.cs,1.1,1.2 ChangeLog,1.30,1.31 ConnectionEventA
Status: Pre-Alpha
Brought to you by:
mastergaurav
From: Gaurav V. <mas...@us...> - 2002-09-06 09:30:30
|
Update of /cvsroot/csmail/csmail/src/CSMail In directory usw-pr-cvs1:/tmp/cvs-serv16186 Modified Files: AssemblyInfo.cs ChangeLog ConnectionEventArgs.cs Constants.cs EMailAddress.cs EMailAddressList.cs Folder.cs Header.cs HeaderList.cs MessagingException.cs Transport.cs Log Message: 2002-09-06 * EMailAddressList.cs : GetAddress(int) - Fixed index bug. : Add(EMailAddress[]) - Fixed null element bug. : ctor(EMailAddress[])- Fixed null element bug. : ctor(EMailAddressList) - Fixed null element bug. : this[int] - Fixed null element bug. * TODO : Added file. * AsseemblyInfo.cs : Added attribute "AssemblyFileVersion". * HeaderList.cs : ctor(Header[]) - Fixed null element bug. : ctor(HeaderList) - Fixed null element bug. * MessagingException.cs : Transformed into a linked list. * <Rest>.cs : Documenting Index: AssemblyInfo.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/AssemblyInfo.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AssemblyInfo.cs 20 Jun 2002 02:43:24 -0000 1.1 +++ AssemblyInfo.cs 6 Sep 2002 09:30:27 -0000 1.2 @@ -1,3 +1,12 @@ +/** + * Assembly: CSMail + * + * Author: Gaurav Vaish + * Maintainer: mastergaurav AT users DOT sf DOT net + * + * (C) Gaurav Vaish (2002) + */ + using System.Reflection; using System.Runtime.CompilerServices; @@ -11,6 +20,8 @@ [assembly: AssemblyTrademark("CS-Mail")] [assembly: AssemblyCulture("")] [assembly: AssemblyVersion("1.0.*")] + +[assembly: AssemblyFileVersion("1.0")] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyName("")] Index: ChangeLog =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/ChangeLog,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- ChangeLog 5 Sep 2002 05:24:21 -0000 1.30 +++ ChangeLog 6 Sep 2002 09:30:27 -0000 1.31 @@ -1,4 +1,19 @@ +2002-09-06 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * EMailAddressList.cs : GetAddress(int) - Fixed index bug. + : Add(EMailAddress[]) - Fixed null element bug. + : ctor(EMailAddress[])- Fixed null element bug. + : ctor(EMailAddressList) + - Fixed null element bug. + : this[int] - Fixed null element bug. + * TODO : Added file. + * AsseemblyInfo.cs : Added attribute "AssemblyFileVersion". + * HeaderList.cs : ctor(Header[]) - Fixed null element bug. + : ctor(HeaderList) - Fixed null element bug. + * MessagingException.cs : Transformed into a linked list. + * <Rest>.cs : Documenting + 2002-09-05 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * BodyPart.cs, Index: ConnectionEventArgs.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/ConnectionEventArgs.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ConnectionEventArgs.cs 20 Jun 2002 02:43:24 -0000 1.1 +++ ConnectionEventArgs.cs 6 Sep 2002 09:30:27 -0000 1.2 @@ -10,15 +10,25 @@ namespace CSMail { + /// <summary> + /// Class that holds arguments to a connection event. + /// </summary> public class ConnectionEventArgs { private ConnectionEventType eventType; + /// <summary> + /// Creates an instance of with required arguments. + /// </summary> + /// <param name="eventType">The type of the connection event.</param> public ConnectionEventArgs(ConnectionEventType eventType) { this.eventType = eventType; } - + + /// <summary> + /// Returns the type of the connection event. + /// </summary> public ConnectionEventType EventType { get Index: Constants.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/Constants.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Constants.cs 29 Aug 2002 11:32:31 -0000 1.1 +++ Constants.cs 6 Sep 2002 09:30:27 -0000 1.2 @@ -10,17 +10,46 @@ namespace CSMail { + /// <summary> + /// Constants to be used widely in CSMail. + /// </summary> public class Constants { + /// <summary> + /// File that stores the list of providers. + /// </summary> + /// <seealso cref="Provider"/> public const string ProviderFile = "CSMail.providers"; + /// <summary> + /// File that stores the list of default providers. + /// </summary> + /// <seealso cref="Provider"/> public const string ProviderFileDefault = "CSMail.providers.default"; + /// <summary> + /// File that stores the address maps. + /// </summary> public const string AddressMapFile = "CSMail.adress.map"; + /// <summary> + /// File that stores the default address maps. + /// </summary> public const string AddressMapFileDefault = "CSMail.adress.map.default"; + /// <summary> + /// The default port number for POP3 protocol + /// </summary> public const int Pop3PortDefault = 110; + /// <summary> + /// The default port number for IMAP protocol + /// </summary> public const int ImapPortDefault = 143; + /// <summary> + /// The default port number for SMTP protocol + /// </summary> public const int SmtpPortDefault = 25; + /// <summary> + /// The default port number for NNTP protocol + /// </summary> public const int NntpPortDefault = 119; } } Index: EMailAddress.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/EMailAddress.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- EMailAddress.cs 5 Sep 2002 05:17:49 -0000 1.3 +++ EMailAddress.cs 6 Sep 2002 09:30:27 -0000 1.4 @@ -27,23 +27,34 @@ private string name; /// <summary> - /// Creates an instance of using userid and hostname. + /// Creates an instance using userid and hostname. /// </summary> /// <remarks> /// The associated string representation would be /// <c>user</c>@<c>host</c> /// </remarks> + /// <param name="user">userid of the email address.</param> + /// <param name="host">hostname of the email address.</param> public EMailAddress(string user, string host) { this.user = user; this.host = host; } + /// <summary> + /// Creates an instance using visible name, userid and hostname. + /// </summary> + /// <param name="name">Visible name of the user.</param> + /// <param name="user">user part of the email address.</param> + /// <param name="host">host part of the email address.</param> public EMailAddress(string name, string user, string host): this(user, host) { this.name = name; } + /// <summary> + /// Returns the user part of the email address. + /// </summary> public string User { get @@ -52,6 +63,9 @@ } } + /// <summary> + /// Returns the host part of the email address. + /// </summary> public string Host { get @@ -60,6 +74,9 @@ } } + /// <summary> + /// Returns the full name of the user. + /// </summary> public string Name { get @@ -68,6 +85,10 @@ } } + /// <summary> + /// Returns the address type. + /// </summary> + /// <seealso cref="AddressType"/> public AddressType AddressType { get @@ -76,6 +97,19 @@ } } + /// <summary> + /// Checks for equality with another address. + /// </summary> + /// <param name="address">Address to be compared with.</param> + /// <returns><c>true</c> if they are same, <c>false</c> + /// otherwise.</returns> + /// <remarks> + /// Two email addresses are equal if they share common + /// <c>user</c> and <c>host</c> parts. Comparision is currently + /// case sensitive, which I think <b>is a bug!</b> But right now, + /// I am too clumsy to correct this... will work on it later. + /// But have submitted the bug in the bug-tracker system! + /// </remarks> public bool Equals(IAddress address) { if(address is EMailAddress) @@ -87,6 +121,19 @@ return false; } + /// <summary> + /// Checks for equality with another object. + /// </summary> + /// <param name="address">Address to be compared with.</param> + /// <returns><c>true</c> if they are same, <c>false</c> + /// otherwise.</returns> + /// <remarks> + /// Two email addresses are equal if they share common + /// <c>user</c> and <c>host</c> parts. Comparision is currently + /// case sensitive, which I think <b>is a bug!</b> But right now, + /// I am too clumsy to correct this... will work on it later. + /// But have submitted the bug in the bug-tracker system! + /// </remarks> public override bool Equals(object address) { if(address is EMailAddress) @@ -98,6 +145,16 @@ return false; } + /// <summary> + /// Checking equality of two email addresses. + /// </summary> + /// <param name="left">Address on the left side of operator.</param> + /// <param name="right">Address on the right side of operator.</param> + /// <returns> + /// <c>true</c> if they are same, <c>false</c> otherwise. + /// <p>Note that a true is returned if both left as well as right are + /// <c>null</c>. Am I right in this logic?</p> + /// </returns> public static bool operator == (EMailAddress left, EMailAddress right) { if(left == null && right == null) @@ -111,17 +168,52 @@ return false; } + /// <summary> + /// Checking inequality of two email addresses. + /// </summary> + /// <param name="left">Address on the left side of operator.</param> + /// <param name="right">Address on the right side of operator.</param> + /// <returns> + /// <c>false</c> if they are same, <c>true</c> otherwise. + /// <p>Note that a false is returned if both left as well as right are + /// <c>null</c>. Am I right in this logic?</p> + /// </returns> public static bool operator != (EMailAddress left, EMailAddress right) { return !(left == right); } + /// <summary> + /// Returns a hashcode for this object. + /// </summary> + /// <returns> + /// The hashcode for the object. + /// </returns> public override int GetHashCode() { string em = user.ToLower() + "@" + host.ToLower(); return em.GetHashCode(); } + /// <summary> + /// Returns the string representation of the email address. + /// </summary> + /// <remarks> + /// The returned value is of the form: + /// <code> + /// Full Name <user@host> + /// </code> + /// or + /// <code> + /// user@host + /// </code> + /// if no name has been provided. Note that the value returned + /// can be directly used in any of the message headers, + /// like "From" etc. + /// </remarks> + /// <returns> + /// String representation. + /// </returns> public override string ToString() { string retVal = String.Empty; Index: EMailAddressList.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/EMailAddressList.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- EMailAddressList.cs 20 Jun 2002 02:43:24 -0000 1.1 +++ EMailAddressList.cs 6 Sep 2002 09:30:27 -0000 1.2 @@ -8,49 +8,95 @@ * (C) Gaurav Vaish (2002) */ +using System; using System.Collections; namespace CSMail { + /// <summary> + /// Class to store a list of email addresses. + /// </summary> + /// <seealso cref="EMailAddress"/> + /// <seealso cref="IAddressList"/> public class EMailAddressList: IAddressList, IEnumerable { private ArrayList emails; + /// <summary> + /// Creates an empty instance. + /// </summary> public EMailAddressList() { emails = new ArrayList(); } + /// <summary> + /// Creates an instance with given addresses. + /// </summary> + /// <param name="addresses">E-Mail addresses to be + /// filled in the initial list.</param> public EMailAddressList(EMailAddress[] addresses) { emails = new ArrayList(); foreach(EMailAddress current in addresses) { - emails.Add(current); + if(current != null) + { + emails.Add(current); + } } } + /// <summary> + /// Creates an instance with given addresses. + /// </summary> + /// <param name="addresses">E-Mail addresses to be + /// filled in the initial list.</param> public EMailAddressList(EMailAddressList addresses) { emails = new ArrayList(); foreach(EMailAddress current in addresses) { - emails.Add(current); + if(current != null) + { + emails.Add(current); + } } } + /// <summary> + /// Gets or sets an address at the specified index. + /// </summary> + /// <param name="index">The numerical index of the value + /// under consideration.</param> public EMailAddress this[int index] { get { + if(index < 0 || index >= Count) + return null; return (EMailAddress)emails[index]; } set { + if(index < 0 || index >= Count) + throw new IndexOutOfRangeException("[this] Index value is beyond limits"); emails[index] = value; } } + /// <summary> + /// Adds an address. + /// </summary> + /// <remarks> + /// This is an implementation for the method given in + /// the interface <c>IAddressList</c>. The address will + /// be added only if it is of type <c>EMailAddress</c>. + /// </remarks> + /// <param name="address">Address to be added to the list.</param> + /// <returns>The number of elements in the list after addition. + /// -1 if the element was not added. + /// </returns> int IAddressList.Add(IAddress address) { if(address is EMailAddress) @@ -58,12 +104,26 @@ return -1; } + /// <summary> + /// Adds an address at the specified position in the list. + /// </summary> + /// <remarks> + /// This is an implementation for the method given in + /// the interface <c>IAddressList</c>. The address will + /// be added only if it is of type <c>EMailAddress</c>. + /// </remarks> + /// <param name="index">Index (zero based) at which the address + /// is to be added in the list.</param> + /// <param name="address">The address to be added</param> void IAddressList.AddAt(int index, IAddress address) { if(address is EMailAddress) AddAt(index, (EMailAddress)address); } + /// <summary> + /// Returns the number of addresses in the list. + /// </summary> public int Count { get @@ -72,69 +132,154 @@ } } + /// <summary> + /// Clears the list. + /// </summary> public void Clear() { emails.Clear(); } + /// <summary> + /// Returns the address at the specified index. + /// </summary> + /// <remarks> + /// The returned address is necessarily an <c>EMailAddress</c>. + /// <p>If <c>index</c> is outside the limits, a <c>null</c> is + /// returned.</p> + /// <p>Should I throw an exception + /// <code> + /// if(index < 0 || index >= Count) + /// </code> ?</p> + /// </remarks> + /// <param name="index">The index of the element to be retrieved.</param> + /// <returns>The address at the specified index.</returns> IAddress IAddressList.GetAddress(int index) { return GetAddress(index); } + /// <summary> + /// Removes an address from the list. + /// </summary> + /// <remarks> + /// Removal is done only if the address is an EMailAddress. + /// </remarks> + /// <param name="address">Address to be removed.</param> void IAddressList.Remove(IAddress address) { if(address is EMailAddress) Remove((EMailAddress)address); } + /// <summary> + /// Adds an email address to the list. + /// </summary> + /// <param name="address">Address to be added.</param> + /// <returns>The number of elements in the list after + /// addition of the new address.</returns> public int Add(EMailAddress address) { return emails.Add(address); } + /// <summary> + /// Adds email addresses to the list. + /// </summary> + /// <param name="addresses">Addresses to be added.</param> + /// <returns>The number of elements in the list after + /// addition of all the elements.</returns> public int Add(EMailAddress[] addresses) { foreach(EMailAddress current in addresses) { - emails.Add(current); + if(current != null) + { + emails.Add(current); + } } return emails.Count; } + /// <summary> + /// Returns the index of an email address in the list. + /// </summary> + /// <param name="address">EMail address under consideration.</param> + /// <returns>The index (zero based) of the address. -1 if + /// not found in the list.</returns> public int IndexOf(EMailAddress address) { return emails.IndexOf(address); } + /// <summary> + /// Adds an address at the specified index. + /// </summary> + /// <param name="index">Index at which the address is to be + /// added.</param> + /// <param name="address">Address to be added.</param> public void AddAt(int index, EMailAddress address) { emails.Insert(index, address); } + /// <summary> + /// Returns the address at the specified index. + /// </summary> + /// <remarks> + /// If <c>index</c> is outside the bounds, a <c>null</c> + /// is returned.<br/> + /// Should I throw an "<c>IndexOutOfRange</c>" exception? + /// </remarks> + /// <param name="index">The index of the address.</param> + /// <returns>EMail address at the given index.</returns> public EMailAddress GetAddress(int index) { + if(index < 0 || index >= Count) + return null; return (EMailAddress)emails[index]; } + /// <summary> + /// Removes an address from the list. + /// </summary> + /// <param name="address">Address to be removed.</param> public void Remove(EMailAddress address) { emails.Remove(address); } + /// <summary> + /// Removes an element at the given index. + /// </summary> + /// <param name="index">Index where the value is to be + /// deleted.</param> public void RemoveAt(int index) { emails.RemoveAt(index); } + /// <summary> + /// Returns the enumerator for this list. + /// </summary> + /// <returns>The list enumerator.</returns> public IEnumerator GetEnumerator() { return emails.GetEnumerator(); } /// <summary> - /// Returns a string of comma separataed addresses. + /// Returns the string representation of the list. /// </summary> + /// <remarks> + /// The returned value is a comma separated list of + /// the email addresses in the list. An example of + /// the returned value would be: + /// <example> + /// Master Gaurav <mas...@us...>, + /// <so...@du...> + /// </example> + /// </remarks> public override string ToString() { string retVal = ""; @@ -146,4 +291,4 @@ return retVal; } } -} \ No newline at end of file +} Index: Folder.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/Folder.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Folder.cs 4 Sep 2002 06:35:42 -0000 1.5 +++ Folder.cs 6 Sep 2002 09:30:27 -0000 1.6 @@ -16,11 +16,75 @@ namespace CSMail { + /// <summary> + /// Abstract class that models a folder. Implementation + /// provided by the providers. + /// </summary> + /// <remarks> + /// This class is an abstract class with implementation furnished + /// by the providers. + /// <p>Folders can of various types. See + /// <see cref="FolderType"/> for more details. + /// </p> + /// <p> + /// What a folder stands for may have totally different meanings + /// when applied to different protocols and providers. An example + /// would be: it refers to a "real" folder for an IMAP provider, + /// while it may refer to a newsgroup for an NNTP provider. + /// </p> + /// <p> + /// It is also possible that folder may not physically exists. + /// To know whether it actually exists, use <see cref="Exists"/> + /// property. To create a folder, use <see cref="Create"/> member. + /// However, actual creation will depend upon whether you have + /// sufficient permissions to create a folder and/or such a method + /// is applicable to the protocol. + /// </p> + /// <!-- + /// <p> + /// The only places where you can get a folder are: + /// <code> + /// <see cref="Store.DefaultFolder"/> + /// <see cref="Store.this[string]"/> + /// <see cref="Store.this[URLName]"/> + /// </code> + /// </p> + /// --> + /// <p> + /// While deleting a message in a folder, the message is not deleted + /// until an explicit <see cref="Expunge"/> is called. + /// </p> + /// <p> + /// <b>Important (for providers as well as users):</b> + /// </p> + /// Folders are not to be cached by Store. Hence, retrieving folder + /// should/will yield different object each time. Whereas, the + /// messages (with their order defined) held within a folder + /// should/do not change unless they are deleted by an explicit + /// <see cref="Expunge"/>. + /// <p> + /// On exiting a folder, it is suggested that + /// <see cref="SaveChanges"/> method is called so that any changes are + /// not lost. Preferably, call it in a destructor or if you make your + /// implementation <c>IDisposable</c>, then in the <c>Dispose</c> + /// method. + /// </p> + /// </remarks> public abstract class Folder //: IEnumerable { + /// <summary> + /// Store with this folder. + /// </summary> protected Store store; protected FolderOpenMode mode; + /* I need it to for queue management + * I saw a class "EventQueue" in the java-mail (tm) + * jar file and the only place I could find its use + * is in Folder, while managing ConnectionEvent-s. + * I have put it, but now I can't find it's use. + * May be I will remove it some time. + */ private object lockObj; protected Folder(Store store) @@ -62,15 +126,15 @@ { get { - return getMessageCount(MessageFlags.Recent); + return GetMessageCount(MessageFlags.Recent); } } - + public int UnreadMessageCount { get { - return getMessageCount(MessageFlags.Seen); + return GetMessageCount(MessageFlags.Seen); } } @@ -78,11 +142,11 @@ { get { - return getMessageCount(MessageFlags.Deleted); + return GetMessageCount(MessageFlags.Deleted); } } - private int getMessageCount(MessageFlags flag) + private int GetMessageCount(MessageFlags flag) { if(!IsOpen) { @@ -136,7 +200,7 @@ /* [MailTODO] - ~Folder() + public virtual ~Folder() { throw new NotImplementedException(); } Index: Header.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/Header.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Header.cs 25 Jul 2002 11:24:14 -0000 1.2 +++ Header.cs 6 Sep 2002 09:30:27 -0000 1.3 @@ -10,11 +10,30 @@ namespace CSMail { + /// <summary> + /// Class to store headers. + /// </summary> + /// <remarks> + /// Some headers have only one value associated. By one value, + /// I mean that it can occur only once. Like "Subject". Whereas, + /// some headers can occur multiple times, like "Received" header + /// in mail protocols (SMTP, POP3, IMAP). + /// <p> + /// This class does not check for such validities. It is left + /// to the deployment tools to check for such things and ensure + /// that the rules are properly followed. + /// </p> + /// </remarks> public class Header { private string name; private string[] values; + /// <summary> + /// Creates an instance with specified header name and its value. + /// </summary> + /// <param name="name">Header name</param> + /// <param name="value">Header value</param> public Header(string name, string value) { this.name = name; @@ -22,6 +41,11 @@ values[0] = value; } + /// <summary> + /// Creates an instance with specified header name and its values. + /// </summary> + /// <param name="name">Header name</param> + /// <param name="values">Header values</param> public Header(string name, string[] values) { this.name = name; @@ -33,6 +57,9 @@ } } + /// <summary> + /// Returns the header name. + /// </summary> public string Name { get @@ -41,6 +68,13 @@ } } + /// <summary> + /// Returns the header value. + /// </summary> + /// <remarks> + /// Incase, there are more than one values, + /// the first value is returned. + /// </remarks> public string Value { get @@ -51,6 +85,9 @@ } } + /// <summary> + /// Returns all the values. + /// </summary> public string[] Values { get @@ -60,14 +97,17 @@ } /// <summary> + /// Returns string representation of the header. + /// </summary> + /// <remarks> /// Returns all the values in the form of: - /// <c> + /// <code> /// Name: Value_1\r\n /// Name: Value_2\r\n - /// </c> + /// </code> /// This can be very useful while creation of headers like "Received" /// in SMTP protocol. - /// </summary> + /// </remarks> public override string ToString() { string retVal = ""; Index: HeaderList.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/HeaderList.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- HeaderList.cs 25 Jul 2002 11:24:14 -0000 1.2 +++ HeaderList.cs 6 Sep 2002 09:30:27 -0000 1.3 @@ -14,35 +14,65 @@ namespace CSMail { + /// <summary> + /// Class to encapsulate a list of headers. + /// </summary> public class HeaderList: IEnumerable { private ArrayList headers = new ArrayList(); + /// <summary> + /// Creates an empty list. + /// </summary> public HeaderList() { } + /// <summary> + /// Creates a list with a header. + /// </summary> + /// <param name="header">The one header in the initial + /// list.</param> public HeaderList(Header header) { headers.Add(header); } + /// <summary> + /// Creates a list with a given set of headers. + /// </summary> + /// <param name="headers">Initial set of headers + /// to be inserted in the list.</param> public HeaderList(Header[] headers) { foreach(Header current in headers) { - this.headers.Add(current); + if(current != null) + { + this.headers.Add(current); + } } } + /// <summary> + /// Creates a list with a given set of headers. + /// </summary> + /// <param name="headers">Initial set of headers + /// to be inserted in the list.</param> public HeaderList(HeaderList headers) { foreach(Header current in headers) { - this.headers.Add(current); + if(current != null) + { + this.headers.Add(current); + } } } + /// <summary> + /// Returns the number of headers in the list. + /// </summary> public int Count { get @@ -51,6 +81,11 @@ } } + /// <summary> + /// Gets / sets the header at specified index. + /// </summary> + /// <param name="index">The index (zero based), + /// the value at which is to be sought.</param> public Header this[int index] { get @@ -63,11 +98,20 @@ } } + /// <summary> + /// Returns an enumerator for the list for iteration. + /// </summary> public IEnumerator GetEnumerator() { return headers.GetEnumerator(); } + /// <summary> + /// Add a header to the list. + /// </summary> + /// <param name="header">Header to be added.</param> + /// <returns>Total number of elements in the list + /// after adding the new header.</returns> public int Add(Header header) { return headers.Add(header); Index: MessagingException.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/MessagingException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MessagingException.cs 3 Sep 2002 12:41:17 -0000 1.1 +++ MessagingException.cs 6 Sep 2002 09:30:27 -0000 1.2 @@ -14,12 +14,35 @@ { public class MessagingException : Exception { + private Exception next; + public MessagingException() : base() { } public MessagingException(string message) : base(message) { + } + + public MessagingException(string message, Exception next) : base(message) + { + this.next = next; + } + + public Exception Next + { + get + { + return next; + } + } + + public override string Message + { + get + { + throw new NotImplementedException(); + } } } } Index: Transport.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/Transport.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Transport.cs 5 Sep 2002 05:24:21 -0000 1.3 +++ Transport.cs 6 Sep 2002 09:30:27 -0000 1.4 @@ -34,7 +34,13 @@ /// <summary> /// Sends the message. /// </summary> + /// <remarks> + /// It is important to note that this method internally calls + /// the <c>SendMessage</c> method, and hence heavily depends + /// on the provider. + /// </remarks> /// <param name="message">The message to be sent.</param> + /// <see cref="SendMessage"/> [MailTODO] public static void Send(Message message) { @@ -44,9 +50,15 @@ /// <summary> /// Send the message to the specified addresslist. /// </summary> - /// <param name="message">Message to be sent.</param> + /// <remarks> + /// It is important to note that this method internally calls + /// the <c>SendMessage</c> method, and hence heavily depends + /// on the provider. + /// </remarks> /// <param name="addresses">Addresses to where the messages /// would be sent.</param> + /// <param name="message">The message to be sent.</param> + /// <see cref="SendMessage"/> [MailTODO] public static void Send(Message message, IAddressList addresses) { |