2002-09-17 Nick Drochak <ndrochak@gol.com>
[mono.git] / mcs / class / System / System.Diagnostics / EventLogEntryCollection.cs
1 //
2 // System.Diagnostics.EventLogEntryCollection.cs
3 //
4 // Authors:
5 //   Jonathan Pryor (jonpryor@vt.edu)
6 //
7 // (C) 2002 Jonathan Pryor
8 //
9
10
11 using System;
12 using System.Collections;
13 using System.Diagnostics;
14
15 namespace System.Diagnostics {
16
17         public class EventLogEntryCollection : ICollection, IEnumerable {
18
19                 private ArrayList eventLogs = new ArrayList ();
20
21                 internal EventLogEntryCollection()
22                 {
23                 }
24
25                 public int Count {
26                         get {return eventLogs.Count;}
27                 }
28
29                 public virtual EventLogEntry this [int index] {
30                         get {return (EventLogEntry) eventLogs[index];}
31                 }
32
33                 bool ICollection.IsSynchronized {
34                         get {return eventLogs.IsSynchronized;}
35                 }
36
37                 object ICollection.SyncRoot {
38                         get {return eventLogs.SyncRoot;}
39                 }
40
41                 public void CopyTo (EventLogEntry[] eventLogs, int index)
42                 {
43                         eventLogs.CopyTo (eventLogs, index);
44                 }
45
46                 public IEnumerator GetEnumerator ()
47                 {
48                         return eventLogs.GetEnumerator ();
49                 }
50
51                 void ICollection.CopyTo (Array array, int index)
52                 {
53                         eventLogs.CopyTo (array, index);
54                 }
55         }
56 }
57