From d2000a582b9740e0769c32051547279e61d1be65 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Fri, 29 Apr 2005 09:19:47 +0000 Subject: 2005-04-29 Martin Baulig Reflect latest API changes. * Collections.cs (EnumerableBase): Explicitly implement System.Collections.IEnumerable.GetEnumerator(). * Makefile: Add `nowarn:169'. svn path=/trunk/mcs/; revision=43780 --- mcs/class/Mono.C5/ChangeLog | 9 +++++++++ mcs/class/Mono.C5/Collections.cs | 5 +++++ mcs/class/Mono.C5/Makefile | 2 +- mcs/class/Mono.C5/Test/SupportClasses.cs | 7 ++++++- mcs/class/Mono.C5/Wrappers.cs | 13 ++++++++++++ mcs/class/Mono.C5/trees/RedBlackTree.cs | 32 ++++++++++++++++++++++++++++++ mcs/class/Mono.C5/trees/RedBlackTreeBag.cs | 32 ++++++++++++++++++++++++++++++ 7 files changed, 98 insertions(+), 2 deletions(-) (limited to 'mcs/class/Mono.C5') diff --git a/mcs/class/Mono.C5/ChangeLog b/mcs/class/Mono.C5/ChangeLog index 68380856e19..8b72cac63d8 100644 --- a/mcs/class/Mono.C5/ChangeLog +++ b/mcs/class/Mono.C5/ChangeLog @@ -1,3 +1,12 @@ +2005-04-29 Martin Baulig + + Reflect latest API changes. + + * Collections.cs (EnumerableBase): Explicitly implement + System.Collections.IEnumerable.GetEnumerator(). + + * Makefile: Add `nowarn:169'. + 2004-11-26 Martin Baulig * Makefile: Removed `NO_TEST = yes'. diff --git a/mcs/class/Mono.C5/Collections.cs b/mcs/class/Mono.C5/Collections.cs index 55954eba18d..d85f6217098 100644 --- a/mcs/class/Mono.C5/Collections.cs +++ b/mcs/class/Mono.C5/Collections.cs @@ -207,6 +207,11 @@ namespace C5 /// The enumerator public abstract MSG.IEnumerator GetEnumerator(); + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator () + { + return GetEnumerator (); + } + /// /// Count the number of items in an enumerable by enumeration /// diff --git a/mcs/class/Mono.C5/Makefile b/mcs/class/Mono.C5/Makefile index 1aba199d7ac..9b981fea78d 100644 --- a/mcs/class/Mono.C5/Makefile +++ b/mcs/class/Mono.C5/Makefile @@ -4,7 +4,7 @@ include ../../build/rules.make LIBRARY = Mono.C5.dll LIBRARY_SNK = c5.snk -LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll +LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll -nowarn:169 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169 EXTRA_DISTFILES = \ diff --git a/mcs/class/Mono.C5/Test/SupportClasses.cs b/mcs/class/Mono.C5/Test/SupportClasses.cs index 65ebc210a2f..c6221c01065 100644 --- a/mcs/class/Mono.C5/Test/SupportClasses.cs +++ b/mcs/class/Mono.C5/Test/SupportClasses.cs @@ -24,7 +24,7 @@ using System; using C5; using NUnit.Framework; using MSG = System.Collections.Generic; - +using C = System.Collections; namespace nunit { @@ -151,6 +151,11 @@ namespace nunit yield return f(i); } + C.IEnumerator C.IEnumerable.GetEnumerator () + { + return GetEnumerator (); + } + public void Apply(Applier a) { } } diff --git a/mcs/class/Mono.C5/Wrappers.cs b/mcs/class/Mono.C5/Wrappers.cs index e156e84fd42..fed4fa7eeaf 100644 --- a/mcs/class/Mono.C5/Wrappers.cs +++ b/mcs/class/Mono.C5/Wrappers.cs @@ -23,6 +23,7 @@ using System; using System.Diagnostics; using MSG = System.Collections.Generic; +using SC = System.Collections; namespace C5 { /// @@ -63,6 +64,15 @@ namespace C5 /// The current item of the wrapped enumerator. public T Current { get { return enumerator.Current; } } + void SC.IEnumerator.Reset () + { + enumerator.Reset (); + } + + object SC.IEnumerator.Current { + get { return enumerator.Current; } + } + #endregion #region IDisposable Members @@ -111,6 +121,9 @@ namespace C5 { return new GuardedEnumerator(enumerable.GetEnumerator()); } #endregion + + SC.IEnumerator SC.IEnumerable.GetEnumerator() + { return GetEnumerator (); } } diff --git a/mcs/class/Mono.C5/trees/RedBlackTree.cs b/mcs/class/Mono.C5/trees/RedBlackTree.cs index f7fac07c9e8..daca84a3c6a 100644 --- a/mcs/class/Mono.C5/trees/RedBlackTree.cs +++ b/mcs/class/Mono.C5/trees/RedBlackTree.cs @@ -38,6 +38,7 @@ using System; using MSG = System.Collections.Generic; +using SC = System.Collections; // NOTE NOTE NOTE NOTE // This source file is used to produce both TreeSet and TreeBag @@ -541,6 +542,16 @@ namespace C5 } } + void SC.IEnumerator.Reset () + { + throw new NotImplementedException (); + } + + object SC.IEnumerator.Current { + get { + return Current; + } + } /// /// Finalizer for enumeratir @@ -654,6 +665,17 @@ namespace C5 #endregion + void SC.IEnumerator.Reset () + { + throw new NotImplementedException (); + } + + object SC.IEnumerator.Current { + get { + return Current; + } + } + #region IDisposable Members [Tested] @@ -3892,6 +3914,16 @@ namespace C5 } } + void SC.IEnumerator.Reset () + { + throw new NotImplementedException (); + } + + object SC.IEnumerator.Current { + get { + return Current; + } + } [Tested] public void Dispose() diff --git a/mcs/class/Mono.C5/trees/RedBlackTreeBag.cs b/mcs/class/Mono.C5/trees/RedBlackTreeBag.cs index 89b8afcf19c..21050b9e62c 100644 --- a/mcs/class/Mono.C5/trees/RedBlackTreeBag.cs +++ b/mcs/class/Mono.C5/trees/RedBlackTreeBag.cs @@ -38,6 +38,7 @@ using System; using MSG = System.Collections.Generic; +using SC = System.Collections; // NOTE NOTE NOTE NOTE // This source file is used to produce both TreeBag and TreeBag @@ -504,6 +505,16 @@ namespace C5 return valid = true; } + void SC.IEnumerator.Reset () + { + throw new NotImplementedException (); + } + + object SC.IEnumerator.Current { + get { + return Current; + } + } #region IDisposable Members for Enumerator @@ -654,6 +665,17 @@ namespace C5 #endregion + void SC.IEnumerator.Reset () + { + throw new NotImplementedException (); + } + + object SC.IEnumerator.Current { + get { + return Current; + } + } + #region IDisposable Members [Tested] @@ -3892,6 +3914,16 @@ namespace C5 } } + void SC.IEnumerator.Reset () + { + throw new NotImplementedException (); + } + + object SC.IEnumerator.Current { + get { + return Current; + } + } [Tested] public void Dispose() -- cgit v1.2.3