SerializationInfoEnumerator.cs 1007 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // System.Runtime.Serialization.SerializationInfoEnumerator.cs
  3. //
  4. // Author: Duncan Mak ([email protected])
  5. //
  6. // (C) Ximian, Inc.
  7. //
  8. using System;
  9. using System.Collections;
  10. using System.Runtime.Serialization;
  11. namespace System.Runtime.Serialization
  12. {
  13. public sealed class SerializationInfoEnumerator : IEnumerator
  14. {
  15. IDictionaryEnumerator ide;
  16. // Constructor
  17. internal SerializationInfoEnumerator (Hashtable collection)
  18. {
  19. ide = collection.GetEnumerator ();
  20. }
  21. // Properties
  22. public SerializationEntry Current
  23. {
  24. get { return (SerializationEntry) ide.Value; }
  25. }
  26. object IEnumerator.Current
  27. {
  28. get { return ide.Value; }
  29. }
  30. public string Name
  31. {
  32. get { return this.Current.Name; }
  33. }
  34. public Type ObjectType
  35. {
  36. get { return this.Current.ObjectType; }
  37. }
  38. public object Value
  39. {
  40. get { return this.Current.Value; }
  41. }
  42. // Methods
  43. public bool MoveNext ()
  44. {
  45. return ide.MoveNext ();
  46. }
  47. public void Reset ()
  48. {
  49. ide.Reset ();
  50. }
  51. }
  52. }