From 20ead35bcd15c258b00da6b1a16d26107f8dea8b Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 11 May 2016 16:51:13 +0200 Subject: CSharp mapping cleanup - Remove code support for old ussuported frameworks (SILVERLIGHT, COMPACT, MONO) - Remove code support for deprecated collection mappings clr:collection --- csharp/src/Ice/HashSet.cs | 114 ---------------------------------------------- 1 file changed, 114 deletions(-) delete mode 100644 csharp/src/Ice/HashSet.cs (limited to 'csharp/src/Ice/HashSet.cs') diff --git a/csharp/src/Ice/HashSet.cs b/csharp/src/Ice/HashSet.cs deleted file mode 100644 index 07b9743404e..00000000000 --- a/csharp/src/Ice/HashSet.cs +++ /dev/null @@ -1,114 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -#if COMPACT - -// -// System.Collections.Generic.HashSet is not available in the .NET Compact Framework. -// This class is a minimal implementation that provides only the methods required by -// Ice internals. -// -using System; -using System.Collections.Generic; - -namespace IceInternal -{ - public class HashSet : ICollection - { - public HashSet() - { - entries_ = new Dictionary(); - } - - public HashSet(int capacity) - { - entries_ = new Dictionary(capacity); - } - - void ICollection.Add(T item) - { - try - { - entries_.Add(item, false); - } - catch(ArgumentException) - { - // Item already present. - } - } - - public bool Add(T item) - { - try - { - entries_.Add(item, false); - } - catch(ArgumentException) - { - return false; // Item already present. - } - return true; - } - - public void Clear() - { - entries_.Clear(); - } - - public bool Contains(T item) - { - return entries_.ContainsKey(item); - } - - public void CopyTo(T[] a, int idx) - { - entries_.Keys.CopyTo(a, idx); - } - - public void CopyTo(T[] a) - { - entries_.Keys.CopyTo(a, 0); - } - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return entries_.Keys.GetEnumerator(); - } - - public IEnumerator GetEnumerator() - { - return entries_.Keys.GetEnumerator(); - } - - public bool Remove(T item) - { - return entries_.Remove(item); - } - - public int Count - { - get - { - return entries_.Count; - } - } - - public bool IsReadOnly - { - get - { - return false; - } - } - - private Dictionary entries_; - } -} - -#endif -- cgit v1.2.3