Merge pull request #4621 from alexanderkyte/strdup_env
[mono.git] / mcs / class / System / System.Diagnostics / EventLogEntryCollection.cs
index 7c73d4264d799f3ae06bc2aaf876d6c0c4e51e91..70cb0df4fcdb5f049e7b1d9f8749f71db0f2e053 100644 (file)
@@ -60,10 +60,10 @@ namespace System.Diagnostics {
                        get { return this; }
                }
 
-               public void CopyTo (EventLogEntry[] eventLogEntries, int index)
+               public void CopyTo (EventLogEntry[] entries, int index)
                {
-                       EventLogEntry[] entries = _impl.GetEntries ();
-                       Array.Copy (entries, 0, eventLogEntries, index, entries.Length);
+                       EventLogEntry[] evLogEntries = _impl.GetEntries ();
+                       Array.Copy (evLogEntries, 0, entries, index, evLogEntries.Length);
                }
 
                public IEnumerator GetEnumerator ()
@@ -90,13 +90,8 @@ namespace System.Diagnostics {
 
                        public EventLogEntry Current {
                                get {
-#if NET_2_0
                                        if (_currentEntry != null)
                                                return _currentEntry;
-#else
-                                       if (_currentIndex >= 0 && _currentIndex < _impl.EntryCount)
-                                               return _impl [_currentIndex];
-#endif
 
                                        throw new InvalidOperationException ("No current EventLog"
                                                + " entry available, cursor is located before the first"
@@ -107,16 +102,12 @@ namespace System.Diagnostics {
                        public bool MoveNext ()
                        {
                                _currentIndex++;
-#if NET_2_0
                                if (_currentIndex >= _impl.EntryCount) {
                                        _currentEntry = null;
                                        return false;
                                }
                                _currentEntry = _impl [_currentIndex];
                                return true;
-#else
-                               return (_currentIndex < _impl.EntryCount);
-#endif
                        }
 
                        public void Reset ()
@@ -126,9 +117,7 @@ namespace System.Diagnostics {
 
                        readonly EventLogImpl _impl;
                        int _currentIndex = -1;
-#if NET_2_0
                        EventLogEntry _currentEntry;
-#endif
                }
 }
 }