You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by di...@apache.org on 2010/04/22 21:16:06 UTC

svn commit: r937025 - /lucene/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs

Author: digy
Date: Thu Apr 22 19:16:06 2010
New Revision: 937025

URL: http://svn.apache.org/viewvc?rev=937025&view=rev
Log:
LUCENENET-357 Mostly won't work on shared hosts / Mosso cloud etc due to 'Trust' levels

Modified:
    lucene/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs

Modified: lucene/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs
URL: http://svn.apache.org/viewvc/lucene/lucene.net/trunk/C%23/src/Lucene.Net/SupportClass.cs?rev=937025&r1=937024&r2=937025&view=diff
==============================================================================
--- lucene/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs (original)
+++ lucene/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs Thu Apr 22 19:16:06 2010
@@ -1165,23 +1165,34 @@ public class SupportClass
         /// is added to the hashtable, the key is wrapped using a WeakKey. WeakKey saves the
         /// value of the original object hashcode for fast comparison.
         /// </summary>
-        class WeakKey : WeakReference
+        class WeakKey 
         {
+            WeakReference reference;
             int hashCode;
 
             public WeakKey(object key)
-                : base(key)
             {
                 if (key == null)
                     throw new ArgumentNullException("key");
 
                 hashCode = key.GetHashCode();
+                reference = new WeakReference(key);
             }
 
             public override int GetHashCode()
             {
                 return hashCode;
             }
+
+            public object Target
+            {
+                get { return reference.Target; }
+            }
+
+            public bool IsAlive
+            {
+                get { return reference.IsAlive; }
+            }
         }
 
         /// <summary>