2010-06-21 Marek Habersack <mhabersack@novell.com>
[mcs.git] / class / System.Design / System.Windows.Forms.Design.Behavior / GlyphCollection.cs
blob59e0ccb82b354cbca7775e7480eabaff751fbdee
1 //
2 // System.Windows.Forms.Design.Behavior.GlyphCollection
3 //
4 // Author:
5 // Atsushi Enomoto (atsushi@ximian.com)
6 //
7 // Copyright (C) 2007 Novell, Inc.
8 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 //
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 //
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 #if NET_2_0
33 using System.Collections;
35 namespace System.Windows.Forms.Design.Behavior
37 public class GlyphCollection : CollectionBase
39 public GlyphCollection ()
43 public GlyphCollection (Glyph [] value)
45 if (value == null)
46 throw new ArgumentNullException ("value");
47 InnerList.AddRange (value);
50 public GlyphCollection (GlyphCollection value)
52 if (value == null)
53 throw new ArgumentNullException ("value");
54 InnerList.AddRange (value);
57 public Glyph this [int index] {
58 get { return (Glyph) InnerList [index]; }
59 set {
60 if (value == null)
61 throw new ArgumentNullException ("value");
62 InnerList [index] = value;
66 public int Add (Glyph value)
68 return InnerList.Add (value);
71 public void AddRange (Glyph [] value)
73 if (value == null)
74 throw new ArgumentNullException ("value");
75 InnerList.AddRange (value);
78 public void AddRange (GlyphCollection value)
80 if (value == null)
81 throw new ArgumentNullException ("value");
82 InnerList.AddRange (value);
85 public bool Contains (Glyph value)
87 return InnerList.Contains (value);
90 public void CopyTo (Glyph [] array, int index)
92 InnerList.CopyTo (array, index);
95 public int IndexOf (Glyph value)
97 return InnerList.IndexOf (value);
100 public void Insert (int index, Glyph value)
102 InnerList.Insert (index, value);
105 public void Remove (Glyph value)
107 InnerList.Remove (value);
112 #endif