2 // Microsoft.Web.Services.Messaging.Configuration.MessagingConfiguration.cs
4 // Author: Todd Berman <tberman@gentoo.org>
6 // (C) 2003 Todd Berman
10 using System
.Collections
;
11 using Microsoft
.Web
.Services
.Messaging
;
12 using Microsoft
.Web
.Services
.Configuration
;
14 namespace Microsoft
.Web
.Services
.Messaging
.Configuration
16 public class MessagingConfiguration
: ConfigurationBase
19 private static Hashtable _transports
;
21 static MessagingConfiguration ()
23 _transports
= new Hashtable ();
26 public MessagingConfiguration () : base ()
29 AddTransport ("soap.tcp", new SoapTcpTransport ());
32 public void AddTransport (string scheme
, ISoapTransport trans
)
34 if(scheme
== null || scheme
.Length
== 0) {
35 throw new ArgumentNullException ("scheme");
38 throw new ArgumentNullException ("transport");
40 _transports
[scheme
] = trans
;
43 public ISoapTransport
GetTransport (string scheme
)
45 if(scheme
== null || scheme
.Length
== 0) {
46 throw new ArgumentNullException ("scheme");
48 return (ISoapTransport
)_transports
[scheme
];
51 public void RemoveTransport (string scheme
)
53 if(scheme
== null || scheme
.Length
== 0) {
54 throw new ArgumentNullException ("scheme");
56 _transports
.Remove (scheme
);
60 public void Load (XmlNode node
)
62 throw new NotImplementedException ();
65 public ICollection Transports
{
66 get { return _transports.Values; }