CssStyleCollection.cs 827 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // System.Web.UI.CssStyleCollection.cs
  3. //
  4. // Authors:
  5. // Duncan Mak ([email protected])
  6. // Gonzalo Paniagua ([email protected])
  7. //
  8. // (C) 2002 Ximian, Inc. (http://www.ximian.com)
  9. //
  10. using System;
  11. using System.Collections;
  12. namespace System.Web.UI {
  13. public sealed class CssStyleCollection
  14. {
  15. private StateBag bag;
  16. internal CssStyleCollection (StateBag bag)
  17. {
  18. this.bag = bag;
  19. }
  20. public int Count {
  21. get { return bag.Count; }
  22. }
  23. public string this [string key] {
  24. get { return bag [key] as string; }
  25. set { bag [key] = value; }
  26. }
  27. public ICollection Keys {
  28. get { return bag.Keys; }
  29. }
  30. public void Add (string key, string value)
  31. {
  32. bag.Add (key, value);
  33. }
  34. public void Clear ()
  35. {
  36. bag.Clear ();
  37. }
  38. public void Remove (string key)
  39. {
  40. bag.Remove (key);
  41. }
  42. }
  43. }