X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Web.Services%2FSystem.Web.Services.Description%2FServiceDescriptionBaseCollection.cs;h=6406d36eeb39b65897dc41664256457de8808a6b;hb=9d64590968b31d427f99cfd0b35adf0f41dd0a7a;hp=ebc2e7b416a1438477f4b5da48060432c4dbe27f;hpb=75df74a96c33af7a99e16e4281272f1b67334a48;p=mono.git diff --git a/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionBaseCollection.cs b/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionBaseCollection.cs index ebc2e7b416a..6406d36eeb3 100644 --- a/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionBaseCollection.cs +++ b/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionBaseCollection.cs @@ -1,11 +1,11 @@ -// -// System.Web.Services.Description.ServiceDescriptionBaseCollection.cs -// -// Author: -// Tim Coleman (tim@timcoleman.com) -// -// Copyright (C) Tim Coleman, 2002 -// +// +// System.Web.Services.Description.ServiceDescriptionBaseCollection.cs +// +// Author: +// Tim Coleman (tim@timcoleman.com) +// +// Copyright (C) Tim Coleman, 2002 +// // // Permission is hereby granted, free of charge, to any person obtaining @@ -27,75 +27,75 @@ // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // - -using System.Collections; -using System.Web.Services; - -namespace System.Web.Services.Description { - public abstract class ServiceDescriptionBaseCollection : CollectionBase { - - #region Fields - - Hashtable table = new Hashtable (); - object parent; - - #endregion // Fields - - #region Constructors - - internal ServiceDescriptionBaseCollection (object parent) - { - this.parent = parent; - } - - #endregion // Constructors - - #region Properties - - protected virtual IDictionary Table { - get { return table; } - } - - #endregion // Properties - - #region Methods - - protected virtual string GetKey (object value) - { - return null; - } - - protected override void OnClear () - { - Table.Clear (); - } - - protected override void OnInsertComplete (int index, object value) - { - if (GetKey (value) != null) - Table [GetKey (value)] = value; - SetParent (value, parent); - } - - protected override void OnRemove (int index, object value) - { - if (GetKey (value) != null) - Table.Remove (GetKey (value)); - } - - protected override void OnSet (int index, object oldValue, object newValue) - { - if (GetKey (oldValue) != null) - Table.Remove (GetKey (oldValue)); - if (GetKey (newValue) != null) - Table [GetKey (newValue)] = newValue; - SetParent (newValue, parent); - } - - protected virtual void SetParent (object value, object parent) - { - } - - #endregion // Methods - } -} + +using System.Collections; +using System.Web.Services; + +namespace System.Web.Services.Description { + public abstract class ServiceDescriptionBaseCollection : CollectionBase { + + #region Fields + + Hashtable table = new Hashtable (); + object parent; + + #endregion // Fields + + #region Constructors + + internal ServiceDescriptionBaseCollection (object parent) + { + this.parent = parent; + } + + #endregion // Constructors + + #region Properties + + protected virtual IDictionary Table { + get { return table; } + } + + #endregion // Properties + + #region Methods + + protected virtual string GetKey (object value) + { + return null; + } + + protected override void OnClear () + { + Table.Clear (); + } + + protected override void OnInsertComplete (int index, object value) + { + if (GetKey (value) != null) + Table [GetKey (value)] = value; + SetParent (value, parent); + } + + protected override void OnRemove (int index, object value) + { + if (GetKey (value) != null) + Table.Remove (GetKey (value)); + } + + protected override void OnSet (int index, object oldValue, object newValue) + { + if (GetKey (oldValue) != null) + Table.Remove (GetKey (oldValue)); + if (GetKey (newValue) != null) + Table [GetKey (newValue)] = newValue; + SetParent (newValue, parent); + } + + protected virtual void SetParent (object value, object parent) + { + } + + #endregion // Methods + } +}