| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- //
- // System.Web.Services.Description.OperationFaultCollection.cs
- //
- // Author:
- // Tim Coleman ([email protected])
- //
- // Copyright (C) Tim Coleman, 2002
- //
- namespace System.Web.Services.Description {
- public sealed class OperationFaultCollection : ServiceDescriptionBaseCollection {
- #region Constructors
- internal OperationFaultCollection (Operation operation)
- : base (operation)
- {
- }
- #endregion // Constructors
- #region Properties
- public OperationFault this [int index] {
- get {
- if (index < 0 || index > Count)
- throw new ArgumentOutOfRangeException ();
- return (OperationFault) List[index];
- }
- set { List [index] = value; }
- }
- public OperationFault this [string name] {
- get { return this [IndexOf ((OperationFault) Table[name])]; }
- }
- #endregion // Properties
- #region Methods
- public int Add (OperationFault operationFaultMessage)
- {
- Insert (Count, operationFaultMessage);
- return (Count - 1);
- }
- public bool Contains (OperationFault operationFaultMessage)
- {
- return List.Contains (operationFaultMessage);
- }
- public void CopyTo (OperationFault[] array, int index)
- {
- List.CopyTo (array, index);
- }
- protected override string GetKey (object value)
- {
- if (!(value is OperationFault))
- throw new InvalidCastException ();
- return ((OperationFault) value).Name;
- }
- public int IndexOf (OperationFault operationFaultMessage)
- {
- return List.IndexOf (operationFaultMessage);
- }
- public void Insert (int index, OperationFault operationFaultMessage)
- {
- List.Insert (index, operationFaultMessage);
- }
-
- public void Remove (OperationFault operationFaultMessage)
- {
- List.Remove (operationFaultMessage);
- }
- protected override void SetParent (object value, object parent)
- {
- ((OperationFault) value).SetParent ((Operation) parent);
- }
-
- #endregion // Methods
- }
- }
|