Merge pull request #4621 from alexanderkyte/strdup_env
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / HotSpotCollection.cs
index 4ae7b40b65d7a8e34cd524ff4f46e2d28fb97e33..c8c43effa63359a90b2bb46fcdf228ac75f23c5b 100644 (file)
@@ -4,7 +4,7 @@
 // Authors:
 //     Lluis Sanchez Gual (lluis@novell.com)
 //
-// (C) 2005 Novell, Inc (http://www.novell.com)
+// (C) 2005-2010 Novell, Inc (http://www.novell.com)
 //
 
 //
@@ -28,8 +28,6 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
-
 using System.Collections;
 using System.ComponentModel;
 using System.Reflection;
@@ -37,18 +35,18 @@ using System.Security.Permissions;
 
 namespace System.Web.UI.WebControls
 {
-       [EditorAttribute ("System.Web.UI.Design.WebControls.HotSpotCollectionEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]\r
-       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]\r
+       [EditorAttribute ("System.Web.UI.Design.WebControls.HotSpotCollectionEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
+       [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
        public sealed class HotSpotCollection: StateManagedCollection
        {
-               private static Type[] _knownTypes = new Type[] { 
+               static Type[] _knownTypes = new Type[] { 
                        typeof (CircleHotSpot),
                        typeof (PolygonHotSpot),
                        typeof (RectangleHotSpot)
                };
                                                    
-               public HotSpot this [int idx] {
-                       get { return (HotSpot) ((IList)this)[idx]; }
+               public HotSpot this [int index] {
+                       get { return (HotSpot) ((IList)this)[index]; }
                }
 
                public int Add (HotSpot spot)
@@ -56,15 +54,15 @@ namespace System.Web.UI.WebControls
                        return ((IList)this).Add (spot);
                }
                
-               protected override object CreateKnownType (int idx)
+               protected override object CreateKnownType (int index)
                {
-                       switch (idx) {
-                       case 0:
-                               return new CircleHotSpot ();
-                       case 1:
-                               return new PolygonHotSpot ();                   
-                       case 2:
-                               return new RectangleHotSpot ();                 
+                       switch (index) {
+                               case 0:
+                                       return new CircleHotSpot ();
+                               case 1:
+                                       return new PolygonHotSpot ();
+                               case 2:
+                                       return new RectangleHotSpot ();
                        }
 
                        throw new ArgumentOutOfRangeException ("index");
@@ -75,9 +73,9 @@ namespace System.Web.UI.WebControls
                        return _knownTypes;
                }
                
-               public void Insert (int idx, HotSpot spot)
+               public void Insert (int index, HotSpot spot)
                {
-                       ((IList)this).Insert (idx, spot);
+                       ((IList)this).Insert (index, spot);
                }
                
                protected override void OnValidate (object o)
@@ -93,17 +91,16 @@ namespace System.Web.UI.WebControls
                        ((IList)this).Remove (spot);
                }
 
-               public void RemoveAt (int idx)
+               public void RemoveAt (int index)
                {
-                       ((IList)this).RemoveAt (idx);
+                       ((IList)this).RemoveAt (index);
                }
 
                protected override void SetDirtyObject (object o)
-               {\r
-                       HotSpot spot = (HotSpot)o;\r
-                       spot.SetDirty ();\r
+               {
+                       HotSpot spot = (HotSpot)o;
+                       spot.SetDirty ();
                }
        }
 }
 
-#endif