-// \r
-// System.Web.Services.Description.PortTypeCollection.cs\r
-//\r
-// Author:\r
-// Tim Coleman (tim@timcoleman.com)\r
-//\r
-// Copyright (C) Tim Coleman, 2002\r
-//\r
+//
+// System.Web.Services.Description.PortTypeCollection.cs
+//
+// Author:
+// Tim Coleman (tim@timcoleman.com)
+//
+// Copyright (C) Tim Coleman, 2002
+//
//
// Permission is hereby granted, free of charge, to any person obtaining
// 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
-namespace System.Web.Services.Description {\r
- public sealed class PortTypeCollection : ServiceDescriptionBaseCollection {\r
-\r
- #region Constructors\r
-\r
- internal PortTypeCollection (ServiceDescription serviceDescription)\r
- : base (serviceDescription)\r
- {\r
- }\r
-\r
- #endregion // Constructors\r
-\r
- #region Properties\r
-\r
- public PortType this [int index] {\r
- get { \r
- if (index < 0 || index > Count)\r
- throw new ArgumentOutOfRangeException ();\r
-\r
- return (PortType) List[index]; \r
- }\r
- set { List [index] = value; }\r
- }\r
-\r
- public PortType this [string name] {\r
- get { \r
- int index = IndexOf ((PortType) Table[name]);\r
- if (index >= 0)\r
- return this[index]; \r
- return null;\r
- }\r
- }\r
-\r
- #endregion // Properties\r
-\r
- #region Methods\r
-\r
- public int Add (PortType portType) \r
- {\r
- Insert (Count, portType); \r
- return (Count - 1);\r
- }\r
-\r
- public bool Contains (PortType portType)\r
- {\r
- return List.Contains (portType);\r
- }\r
-\r
- public void CopyTo (PortType[] array, int index) \r
- {\r
- List.CopyTo (array, index);\r
- }\r
-\r
- protected override string GetKey (object value) \r
- {\r
- if (!(value is PortType))\r
- throw new InvalidCastException ();\r
- return ((PortType) value).Name;\r
- }\r
-\r
- public int IndexOf (PortType portType)\r
- {\r
- return List.IndexOf (portType);\r
- }\r
-\r
- public void Insert (int index, PortType portType)\r
- {\r
- List.Insert (index, portType);\r
- }\r
- \r
- public void Remove (PortType portType)\r
- {\r
- List.Remove (portType);\r
- }\r
- \r
- protected override void SetParent (object value, object parent)\r
- {\r
- ((PortType) value).SetParent ((ServiceDescription) parent); \r
- }\r
- \r
- #endregion // Methods\r
- }\r
-}\r
+
+namespace System.Web.Services.Description {
+ public sealed class PortTypeCollection : ServiceDescriptionBaseCollection {
+
+ #region Constructors
+
+ internal PortTypeCollection (ServiceDescription serviceDescription)
+ : base (serviceDescription)
+ {
+ }
+
+ #endregion // Constructors
+
+ #region Properties
+
+ public PortType this [int index] {
+ get {
+ if (index < 0 || index > Count)
+ throw new ArgumentOutOfRangeException ();
+
+ return (PortType) List[index];
+ }
+ set { List [index] = value; }
+ }
+
+ public PortType this [string name] {
+ get {
+ int index = IndexOf ((PortType) Table[name]);
+ if (index >= 0)
+ return this[index];
+ return null;
+ }
+ }
+
+ #endregion // Properties
+
+ #region Methods
+
+ public int Add (PortType portType)
+ {
+ Insert (Count, portType);
+ return (Count - 1);
+ }
+
+ public bool Contains (PortType portType)
+ {
+ return List.Contains (portType);
+ }
+
+ public void CopyTo (PortType[] array, int index)
+ {
+ List.CopyTo (array, index);
+ }
+
+ protected override string GetKey (object value)
+ {
+ if (!(value is PortType))
+ throw new InvalidCastException ();
+ return ((PortType) value).Name;
+ }
+
+ public int IndexOf (PortType portType)
+ {
+ return List.IndexOf (portType);
+ }
+
+ public void Insert (int index, PortType portType)
+ {
+ List.Insert (index, portType);
+ }
+
+ public void Remove (PortType portType)
+ {
+ List.Remove (portType);
+ }
+
+ protected override void SetParent (object value, object parent)
+ {
+ ((PortType) value).SetParent ((ServiceDescription) parent);
+ }
+
+ #endregion // Methods
+ }
+}