Exemple #1
0
 public static void AssertNotGetWrite <T>(this ILockScopeDictionary <T> dict, params T[] keys)
 {
     InvokeInThread(() =>
     {
         IDisposable scope;
         if (dict.TryGetScope(null, keys, TimeSpan.FromMilliseconds(0), out scope))
         {
             scope.Dispose();
             Assert.Fail("Write was get");
         }
     });
 }
Exemple #2
0
 public static void AssertGetRead <T>(this ILockScopeDictionary <T> dict, params T[] keys)
 {
     InvokeInThread(() =>
     {
         IDisposable scope;
         if (!dict.TryGetScope(keys, null, TimeSpan.FromMilliseconds(0), out scope))
         {
             Assert.Fail("Timeout get read");
         }
         scope.Dispose();
     });
 }
Exemple #3
0
 public bool TryDisposable(out IDisposable scope)
 {
     return(_dict.TryGetScope(ToRead, ToWrite, WithTimeout, out scope));
 }