2002-07-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono.git] / mcs / class / System.Web / System.Web.UI / CssStyleCollection.cs
1 //
2 // System.Web.UI.CssStyleCollection.cs
3 //
4 // Authors:
5 //      Duncan Mak  (duncan@ximian.com)
6 //      Gonzalo Paniagua (gonzalo@ximian.com)
7 //
8 // (C) 2002 Ximian, Inc. (http://www.ximian.com)
9 //
10
11 using System;
12 using System.Collections;
13
14 namespace System.Web.UI {
15
16         public sealed class CssStyleCollection
17         {
18                 private StateBag bag;
19
20                 internal CssStyleCollection (StateBag bag)
21                 {
22                         this.bag = bag;
23                 }
24                 
25                 public int Count {
26                         get { return bag.Count; }
27                 }
28
29                 public string this [string key] {
30
31                         get { return bag [key] as string; }
32
33                         set { bag [key] = value; }
34                 }
35
36                 public ICollection Keys {
37                         get { return bag.Keys; }
38                 }
39
40                 public void Add (string key, string value)
41                 {
42                         bag.Add (key, value);
43                 }
44
45                 public void Clear ()
46                 {
47                         bag.Clear ();
48                 }
49
50                 public void Remove (string key)
51                 {
52                         bag.Remove (key);
53                 }
54         }
55 }
56