EventLogEntryCollection.cs 1019 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // System.Diagnostics.EventLogEntryCollection.cs
  3. //
  4. // Authors:
  5. // Jonathan Pryor ([email protected])
  6. //
  7. // (C) 2002 Jonathan Pryor
  8. //
  9. using System;
  10. using System.Collections;
  11. using System.Diagnostics;
  12. namespace System.Diagnostics {
  13. public class EventLogEntryCollection : ICollection, IEnumerable {
  14. private ArrayList eventLogs = new ArrayList ();
  15. internal EventLogEntryCollection()
  16. {
  17. }
  18. public int Count {
  19. get {return eventLogs.Count;}
  20. }
  21. public virtual EventLogEntry this [int index] {
  22. get {return (EventLogEntry) eventLogs[index];}
  23. }
  24. bool ICollection.IsSynchronized {
  25. get {return eventLogs.IsSynchronized;}
  26. }
  27. object ICollection.SyncRoot {
  28. get {return eventLogs.SyncRoot;}
  29. }
  30. public void CopyTo (EventLogEntry[] eventLogs, int index)
  31. {
  32. eventLogs.CopyTo (eventLogs, index);
  33. }
  34. public IEnumerator GetEnumerator ()
  35. {
  36. return eventLogs.GetEnumerator ();
  37. }
  38. void ICollection.CopyTo (Array array, int index)
  39. {
  40. eventLogs.CopyTo (array, index);
  41. }
  42. }
  43. }