Update of /cvsroot/csmail/csmail/src/CSMail
In directory usw-pr-cvs1:/tmp/cvs-serv18191
Modified Files:
ChangeLog ContentType.cs MimeMessage.cs Multipart.cs
Log Message:
2002-11-07
* ContentType.cs : op_== (ContentType, string)
- Implemented.
* MimeMessage.cs : Write(StreamWriter) - Save changes.
* Multipart.cs : UpdateHeaders() - Made public.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/csmail/csmail/src/CSMail/ChangeLog,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- ChangeLog 31 Oct 2002 10:41:21 -0000 1.64
+++ ChangeLog 7 Nov 2002 09:56:35 -0000 1.65
@@ -1,4 +1,11 @@
+2002-11-07 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
+
+ * ContentType.cs : op_== (ContentType, string)
+ - Implemented.
+ * MimeMessage.cs : Write(StreamWriter) - Save changes.
+ * Multipart.cs : UpdateHeaders() - Made public.
+
2002-10-31 Gaurav Vaish <mastergaurav AT users DOT sf DOT net>
* MimeMessage.cs : ContentLanguage { get; set; },
Index: ContentType.cs
===================================================================
RCS file: /cvsroot/csmail/csmail/src/CSMail/ContentType.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ContentType.cs 9 Oct 2002 07:09:30 -0000 1.8
+++ ContentType.cs 7 Nov 2002 09:56:35 -0000 1.9
@@ -214,11 +214,35 @@
if(left.SubType[0] == '*' || right.SubType[0] == '*')
return retVal;
- retVal &= (String.Compare(left.SubType,
+ retVal &= (String.Compare(left.SubType,
right.SubType, false) == 0);
return retVal;
}
+ public static bool operator == (ContentType left, string right)
+ {
+ if(null == (object)left || null == (object)right)
+ return false;
+
+ try
+ {
+ ContentType that = new ContentType(right);
+ if(left == that)
+ return true;
+ if(left.Parameters != that.Parameters)
+ return false;
+ } catch(ParseException)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ public static bool operator != (ContentType left, string right)
+ {
+ return !(left == right);
+ }
+
/// <summary>
/// Compares two <see cref="T:CSMail.ContentType"/>
/// objects.
@@ -283,7 +307,7 @@
/// <param name="cType">Object to match with.</param>
public bool Equals(ContentType cType)
{
- if(null != (Object)cType)
+ if(null != (object)cType)
{
return (this == cType);
}
@@ -311,7 +335,7 @@
{
ContentType that = new ContentType(cType);
if(this == that)
- return false;
+ return true;
if(this.Parameters != that.Parameters)
return false;
} catch(ParseException)
Index: MimeMessage.cs
===================================================================
RCS file: /cvsroot/csmail/csmail/src/CSMail/MimeMessage.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- MimeMessage.cs 31 Oct 2002 10:41:21 -0000 1.8
+++ MimeMessage.cs 7 Nov 2002 09:56:35 -0000 1.9
@@ -501,6 +501,8 @@
[MailTODO]
public override void Write(StreamWriter writer)
{
+ if(!isSaved)
+ SaveChanges();
throw new NotImplementedException();
}
}
Index: Multipart.cs
===================================================================
RCS file: /cvsroot/csmail/csmail/src/CSMail/Multipart.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Multipart.cs 24 Sep 2002 08:34:52 -0000 1.6
+++ Multipart.cs 7 Nov 2002 09:56:35 -0000 1.7
@@ -119,7 +119,7 @@
/// </remarks>
protected abstract void ParseBodyParts();
- protected virtual void UpdateHeaders()
+ public virtual void UpdateHeaders()
{
for(int i = 0; i < BodyParts.Count; i++)
{
|