[Csmail-patches] CVS: csmail/src/CSMail.Utils DateUtils.cs,NONE,1.1 MimeUtils.cs,NONE,1.1 ChangeLog,
Status: Pre-Alpha
Brought to you by:
mastergaurav
From: Gaurav V. <mas...@us...> - 2002-09-30 04:02:40
|
Update of /cvsroot/csmail/csmail/src/CSMail.Utils In directory usw-pr-cvs1:/tmp/cvs-serv4281 Modified Files: ChangeLog Added Files: DateUtils.cs MimeUtils.cs Log Message: 2002-09-27 * DateUtils.cs : Added new class. : CreateDateHeader(DateTime), : ParseToLocalTime(Header), : ParseToGMT(Header) - Stubbed. * MimeUtils.cs : Added new class. : GetParameters(string, char[]), : GetParametsrsAsList(string, char[]) - Implemented. --- NEW FILE --- /** * Namespace: CSMail.Utils * Class: DateUtils * * Author: Gaurav Vaish * Maintainer: mastergaurav AT users DOT sf DOT net * * (C) Gaurav Vaish (2002) */ using System; using CSMail; namespace CSMail.Utils { public class DateUtils { [MailTODO] public static DateTime ParseToLocalTime(Header header) { throw new NotImplementedException(); } [MailTODO] public static DateTime ParseToGMT(Header header) { throw new NotImplementedException(); } [MailTODO] public static string CreateDateHeader(DateTime time) { throw new NotImplementedException(); } } } --- NEW FILE --- /** * Namespace: CSMail.Utils * Class: MimeUtils * * Author: Gaurav Vaish * Maintainer: mastergaurav AT users DOT sf DOT net * * (C) Gaurav Vaish (2002) */ using System; using CSMail; namespace CSMail.Utils { public class MimeUtils { public static string[] GetParameters(string headerValue, char[] separators) { if(headerValue == null) { return null; } if(separators == null) { separators = new char[] { ';' }; } headerValue = headerValue.Trim(); if(headerValue.Length > 0) { string[] parts = headerValue.Split(separators); if(parts.Length > 1) { string[] retVal = new string[parts.Length - 1]; for(int i = 0; i < retVal.Length; i++) { retVal[i] = parts[i+1]; } } } return null; } public static ParameterList GetParametersAsList(string headerValue, char[] separators) { if(headerValue != null) { headerValue = headerValue.Trim(); if(headerValue.Length > 0) { if(separators == null) { separators = new char[] { ';' }; string[] parts = headerValue.Split(separators); if(parts.Length > 1) { ParameterList retVal = new ParameterList(); char[] kvsep = new char[]{ '=' }; for(int i = 1; i < parts.Length; i++) { string[] keyval = parts[i].Split(kvsep); if(keyval.Length > 1) { retVal.Add(new Parameter(keyval[0], keyval[1])); } } return retVal; } } } } return null; } } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail.Utils/ChangeLog,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ChangeLog 26 Sep 2002 09:45:40 -0000 1.10 +++ ChangeLog 30 Sep 2002 04:02:38 -0000 1.11 @@ -1,8 +1,20 @@ +2002-09-27 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + + * DateUtils.cs : Added new class. + : CreateDateHeader(DateTime), + : ParseToLocalTime(Header), + : ParseToGMT(Header) + - Stubbed. + * MimeUtils.cs : Added new class. + : GetParameters(string, char[]), + : GetParametsrsAsList(string, char[]) + - Implemented. + 2002-09-26 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> * UniqueValueGenerator.cs : Added new class. - : GenerateBoundary() - Implemented + : GenerateBoundary() - Implemented. 2002-09-13 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> |