[Dnsmail-cvs] dnsmail/DnsMail RecipientCollection.cs,1.1,1.2
Brought to you by:
ethem
From: Ethem E. <et...@us...> - 2006-08-07 11:06:13
|
Update of /cvsroot/dnsmail/dnsmail/DnsMail In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv22243/dnsmail/DnsMail Modified Files: RecipientCollection.cs Log Message: Coding art. tabs, spaces, etc... :) Index: RecipientCollection.cs =================================================================== RCS file: /cvsroot/dnsmail/dnsmail/DnsMail/RecipientCollection.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RecipientCollection.cs 2 Mar 2006 16:54:06 -0000 1.1 --- RecipientCollection.cs 7 Aug 2006 11:06:09 -0000 1.2 *************** *** 7,13 **** public sealed class RecipientCollection : ArrayList { ! public RecipientCollection() : base() {} ! public RecipientCollection(int capacity) : base(capacity) {} ! public RecipientCollection(bool usesMailServer) : this() { ums = usesMailServer; --- 7,14 ---- public sealed class RecipientCollection : ArrayList { ! public RecipientCollection() : base() { } ! public RecipientCollection(int capacity) : base(capacity) { } ! public RecipientCollection(bool usesMailServer) ! : this() { ums = usesMailServer; *************** *** 20,36 **** Recipient tmpAdd; ! if( recipient is Recipient ) tmpAdd = recipient as Recipient; ! else if( recipient is String ) tmpAdd = new Recipient(recipient as String); else ! throw new ArgumentException(String.Format("Add a Recipient or String object. You used: {0}", recipient.GetType().FullName), "recipient"); ! if( (tmpAdd.Email == null) || (tmpAdd.Email == string.Empty) ) throw new EmailException(String.Format("Email address cannot be null. Count: {0}", Count)); if (!ums) { ! if (Count == 0) { if ((domain = DnsMail.FindEmailDomain(tmpAdd.Email)) == null) --- 21,37 ---- Recipient tmpAdd; ! if (recipient is Recipient) tmpAdd = recipient as Recipient; ! else if (recipient is String) tmpAdd = new Recipient(recipient as String); else ! throw new ArgumentException(String.Format("Add a Recipient or String object. You used: {0}", recipient.GetType().FullName), "recipient"); ! if ((tmpAdd.Email == null) || (tmpAdd.Email == string.Empty)) throw new EmailException(String.Format("Email address cannot be null. Count: {0}", Count)); if (!ums) { ! if (Count == 0) { if ((domain = DnsMail.FindEmailDomain(tmpAdd.Email)) == null) *************** *** 39,43 **** else { ! if( domain != DnsMail.FindEmailDomain(tmpAdd.Email) ) throw new EmailException(String.Format("{0} cannot add; All Recipients' domains must be @{1}.", tmpAdd.Email, domain)); } --- 40,44 ---- else { ! if (domain != DnsMail.FindEmailDomain(tmpAdd.Email)) throw new EmailException(String.Format("{0} cannot add; All Recipients' domains must be @{1}.", tmpAdd.Email, domain)); } *************** *** 53,57 **** } ! public override Object this[int index] { get { return base[index]; } --- 54,58 ---- } ! public override Object this[int index] { get { return base[index]; } *************** *** 59,63 **** } ! public override void Insert(int index, Object recipient) { this.Add(recipient); --- 60,64 ---- } ! public override void Insert(int index, Object recipient) { this.Add(recipient); *************** *** 66,70 **** private bool ums; private string domain; ! public string Domain { get { return domain; } --- 67,71 ---- private bool ums; private string domain; ! public string Domain { get { return domain; } |