2006-11-02 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / System.Web.Services / System.Web.Services.Discovery / DiscoveryClientReferenceCollection.cs
index 7cee34b1a1615846c23639bb31980cc43eefbd8e..130ce28e28c5a59195197d659957e130d300315e 100755 (executable)
@@ -3,9 +3,32 @@
 //\r
 // Author:\r
 //   Dave Bettin (javabettin@yahoo.com)\r
+//   Tim Coleman (tim@timcoleman.com)\r
 //\r
 // Copyright (C) Dave Bettin, 2002\r
+// Copyright (C) Tim Coleman, 2002\r
 //\r
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 \r
 using System.Collections;\r
 \r
@@ -14,60 +37,50 @@ namespace System.Web.Services.Discovery {
 \r
                #region Constructors\r
 \r
-               [MonoTODO]\r
                public DiscoveryClientReferenceCollection () \r
+                       : base ()\r
                {\r
-                       throw new NotImplementedException ();\r
                }\r
                \r
                #endregion // Constructors\r
 \r
                #region Properties\r
 \r
-               public DiscoveryReference this[string url] {\r
-                       [MonoTODO]\r
-                       get { throw new NotImplementedException (); }\r
-                       \r
-                       [MonoTODO]\r
-                       set { throw new NotImplementedException (); }\r
+               public DiscoveryReference this [string url] {\r
+                       get { return (DiscoveryReference) InnerHashtable [url]; }\r
+                       set { InnerHashtable [url] = value; }\r
                }\r
                \r
                public ICollection Keys {\r
-                       [MonoTODO]\r
-                       get { throw new NotImplementedException (); }\r
+                       get { return InnerHashtable.Keys; }\r
                }\r
                \r
                public ICollection Values {\r
-                       [MonoTODO]\r
-                       get { throw new NotImplementedException (); }\r
+                       get { return InnerHashtable.Values; }\r
                }\r
                \r
                #endregion // Properties\r
 \r
                #region Methods\r
 \r
-               [MonoTODO]\r
                public void Add (DiscoveryReference value)\r
                {\r
-                        throw new NotImplementedException ();\r
+                       Add (value.Url, value);\r
                }\r
                \r
-               [MonoTODO]\r
                public void Add (string url, DiscoveryReference value)\r
                {\r
-                        throw new NotImplementedException ();\r
+                       InnerHashtable [url] = value;\r
                }\r
 \r
-               [MonoTODO]\r
                public bool Contains (string url)\r
                {\r
-                        throw new NotImplementedException ();\r
+                       return InnerHashtable.Contains (url);\r
                }\r
                \r
-               [MonoTODO]\r
                public void Remove (string url)\r
                {\r
-                        throw new NotImplementedException ();\r
+                       InnerHashtable.Remove (url);\r
                }\r
 \r
                #endregion // Methods\r