Exemplo n.º 1
0
 private RwLockedResource([NotNull] TVault v, [NotNull] Vault <T> .Box b,
                          [NotNull] Func <TVault, Vault <T> .Box, AcquisitionMode, Vault <T> .Box> disposeMethod)
 {
     Debug.Assert(b != null && v != null && disposeMethod != null);
     _box           = b;
     _disposeMethod = disposeMethod;
     _flag          = new DisposeFlag();
     _vault         = v;
 }
Exemplo n.º 2
0
 private LockedMonVaultObject([NotNull] TVault v, [NotNull] Vault <T> .Box b,
                              [NotNull] Func <MonitorVault <T>, Vault <T> .Box, Vault <T> .Box> disposeMethod)
 {
     Debug.Assert(v != null && b != null && disposeMethod != null);
     _box           = b;
     _disposeMethod = disposeMethod;
     _flag          = new DisposeFlag();
     _vault         = v;
 }
Exemplo n.º 3
0
 private ReadOnlyUpgradableRwLockedResource([NotNull] TVault v, [NotNull] Vault <T> .Box b,
                                            [NotNull] Func <TVault, Vault <T> .Box, AcquisitionMode, Vault <T> .Box> disposeMethod, [NotNull] Action <TimeSpan?, CancellationToken> upgradeAction,
                                            [NotNull] Action upgradeForeverAction)
 {
     Debug.Assert(b != null && v != null && disposeMethod != null && upgradeAction != null && upgradeForeverAction != null);
     _box             = b;
     _disposeMethod   = disposeMethod;
     _flag            = new DisposeFlag();
     _vault           = v;
     _upgradeForever  = upgradeForeverAction;
     _upgradeWithWait = upgradeAction;
 }