Merge pull request #2171 from lambdageek/dev/fix-marshal
[mono.git] / mcs / class / System / System.Net / HttpListenerPrefixCollection.cs
index 431a8dadf20560fc22c6f107270ae6ec1e236498..dffb521ded455a128a09584704eceae1f46fd463 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 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,12 +95,14 @@ namespace System.Net {
                        ((ICollection) prefixes).CopyTo (array, offset);
                }
 
-               public IEnumerator GetEnumerator ()
+#if !EMBEDDED_IN_1_0
+               public IEnumerator<string> GetEnumerator ()
                {
                        return prefixes.GetEnumerator ();
                }
-
-               IEnumerator<string> IEnumerable<string>.GetEnumerator ()
+#endif
+       
+               IEnumerator IEnumerable.GetEnumerator ()
                {
                        return prefixes.GetEnumerator ();
                }