[Csmail-patches] CVS: csmail/src/CSMail NoSuchProviderException.cs,NONE,1.1 ChangeLog,1.20,1.21 Serv
Status: Pre-Alpha
Brought to you by:
mastergaurav
From: Gaurav V. <mas...@us...> - 2002-09-02 12:49:21
|
Update of /cvsroot/csmail/csmail/src/CSMail In directory usw-pr-cvs1:/tmp/cvs-serv12525 Modified Files: ChangeLog Service.cs Session.cs Added Files: NoSuchProviderException.cs Log Message: 2002-09-02 * Service.cs : Why do I need destructor? or have I forgotten something that I thought earlier? * Session.cs : GetStore(...) - Implemented all. : GetStore(URLName, Provider) - Stubbed * NoSuchProviderException.cs : Added exception --- NEW FILE --- /** * Namespace: CSMail * Class: NoSuchProviderException * * Author: Gaurav Vaish * Maintainer: mastergaurav AT users DOT sf DOT net * * (C) Gaurav Vaish (2002) */ using System; namespace CSMail { public class NoSuchProviderException : Exception { public NoSuchProviderException() : base() { } public NoSuchProviderException(string message) : base(message) { } } } Index: ChangeLog =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/ChangeLog,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- ChangeLog 2 Sep 2002 11:04:27 -0000 1.20 +++ ChangeLog 2 Sep 2002 12:49:17 -0000 1.21 @@ -1,6 +1,16 @@ 2002-09-02 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * Service.cs : Why do I need destructor? or have I forgotten + something that I thought earlier? + * Session.cs : GetStore(...) - Implemented all. + : GetStore(URLName, Provider) + - Stubbed + * NoSuchProviderException.cs + : Added exception + +2002-09-02 Gaurav Vaish <mastergaurav AT users DOT sf DOT net> + * URLName.cs : No need to set any default values to protocol, host and port. Index: Service.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/Service.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Service.cs 30 Aug 2002 12:39:33 -0000 1.3 +++ Service.cs 2 Sep 2002 12:49:17 -0000 1.4 @@ -82,12 +82,6 @@ throw new NotImplementedException(); } - [MailTODO] - ~Service() - { - throw new NotImplementedException(); - } - public event ConnectionEventHandler Connection { add @@ -100,4 +94,4 @@ } } } -} \ No newline at end of file +} Index: Session.cs =================================================================== RCS file: /cvsroot/csmail/csmail/src/CSMail/Session.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- Session.cs 30 Aug 2002 12:17:20 -0000 1.10 +++ Session.cs 2 Sep 2002 12:49:17 -0000 1.11 @@ -43,9 +43,33 @@ } } + public Store GetStore() + { + return GetStore("mail.store.protocol"); + } + + public Store GetStore(string protocol) + { + return GetStore(new URLName(protocol, null, -1, null, null, null)); + } + + public Store GetStore(URLName url) + { + return GetStore(url, (url != null ? Providers[url.Protocol] : null)); + } + + public Store GetStore(Provider provider) + { + return GetStore(null, provider); + } + [MailTODO] - public Store GetStore(object key) + private Store GetStore(URLName url, Provider provider) { + if(provider == null || provider.Type != ProviderType.Store) + { + throw new NoSuchProviderException("Invalid provider"); + } throw new NotImplementedException(); } |