Merge pull request #205 from m3rlinez/master
[mono.git] / mcs / class / System / System.Net / HttpListenerPrefixCollection.cs
index 6cccc9fa929e951539560f226852b7557b1fe2c5..6cbe8ff5680305424cebe46232bbdea21a1ba9db 100644 (file)
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-#if NET_2_0
+#if NET_2_0 && SECURITY_DEP || EMBEDDED_IN_1_0
+
 using System.Collections;
 using System.Collections.Generic;
 namespace System.Net {
+#if EMBEDDED_IN_1_0
+       public class HttpListenerPrefixCollection : IEnumerable, ICollection {
+               ArrayList prefixes;
+               
+#else
        public class HttpListenerPrefixCollection : ICollection<string>, IEnumerable<string>, IEnumerable {
+               List<string> prefixes = new List<string> ();
+#endif
                HttpListener listener;
-               List<string> prefixes;
 
                internal HttpListenerPrefixCollection (HttpListener listener)
                {
                        this.listener = listener;
-                       prefixes = new List<string> ();
                }
 
                public int Count {
@@ -89,11 +95,13 @@ namespace System.Net {
                        ((ICollection) prefixes).CopyTo (array, offset);
                }
 
+#if !EMBEDDED_IN_1_0
                public IEnumerator<string> GetEnumerator ()
                {
                        return prefixes.GetEnumerator ();
                }
-
+#endif
+       
                IEnumerator IEnumerable.GetEnumerator ()
                {
                        return prefixes.GetEnumerator ();