summaryrefslogtreecommitdiff
path: root/lib/csharp/src/Collections/THashSet.cs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csharp/src/Collections/THashSet.cs')
-rw-r--r--lib/csharp/src/Collections/THashSet.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/csharp/src/Collections/THashSet.cs b/lib/csharp/src/Collections/THashSet.cs
index e2fc8b526..b71a8d235 100644
--- a/lib/csharp/src/Collections/THashSet.cs
+++ b/lib/csharp/src/Collections/THashSet.cs
@@ -21,14 +21,23 @@ using System;
using System.Collections;
using System.Collections.Generic;
+#if SILVERLIGHT
+using System.Runtime.Serialization;
+#endif
+
namespace Thrift.Collections
{
-#if !SILVERLIGHT
- [Serializable]
+#if SILVERLIGHT
+ [DataContract]
+#else
+ [Serializable]
#endif
public class THashSet<T> : ICollection<T>
{
#if NET_2_0 || SILVERLIGHT
+#if SILVERLIGHT
+ [DataMember]
+#endif
TDictSet<T> set = new TDictSet<T>();
#else
HashSet<T> set = new HashSet<T>();
@@ -79,8 +88,14 @@ namespace Thrift.Collections
}
#if NET_2_0 || SILVERLIGHT
+#if SILVERLIGHT
+ [DataContract]
+#endif
private class TDictSet<V> : ICollection<V>
{
+#if SILVERLIGHT
+ [DataMember]
+#endif
Dictionary<V, TDictSet<V>> dict = new Dictionary<V, TDictSet<V>>();
public int Count