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"); } }); }
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(); }); }
public bool TryDisposable(out IDisposable scope) { return(_dict.TryGetScope(ToRead, ToWrite, WithTimeout, out scope)); }