diff options
author | Jose <jose@zeroc.com> | 2016-05-11 16:51:13 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-05-11 16:51:13 +0200 |
commit | 20ead35bcd15c258b00da6b1a16d26107f8dea8b (patch) | |
tree | 0aa99a82b9d56383c76c372fc1050dfd5493b4e9 /csharp/src/Ice/HashSet.cs | |
parent | Fixed make install issue (diff) | |
download | ice-20ead35bcd15c258b00da6b1a16d26107f8dea8b.tar.bz2 ice-20ead35bcd15c258b00da6b1a16d26107f8dea8b.tar.xz ice-20ead35bcd15c258b00da6b1a16d26107f8dea8b.zip |
CSharp mapping cleanup
- Remove code support for old ussuported frameworks (SILVERLIGHT, COMPACT, MONO)
- Remove code support for deprecated collection mappings clr:collection
Diffstat (limited to 'csharp/src/Ice/HashSet.cs')
-rw-r--r-- | csharp/src/Ice/HashSet.cs | 114 |
1 files changed, 0 insertions, 114 deletions
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<T> : ICollection<T> - { - public HashSet() - { - entries_ = new Dictionary<T, bool>(); - } - - public HashSet(int capacity) - { - entries_ = new Dictionary<T, bool>(capacity); - } - - void ICollection<T>.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<T> 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<T, bool> entries_; - } -} - -#endif |