private DatabaseConnection GetContextHandleConnection <TLockCookie>(IDistributedSynchronizationHandle contextHandle)
            where TLockCookie : class
        {
            var connection = ((Handle <TLockCookie>)contextHandle).Connection;

            if (connection == null)
            {
                throw new ObjectDisposedException(nameof(contextHandle), "the provided handle is already disposed");
            }
            return(connection);
        }
Beispiel #2
0
 internal MySqlDistributedLockHandle(IDistributedSynchronizationHandle innerHandle)
 {
     this._innerHandle = innerHandle;
 }
 internal SqlDistributedSemaphoreHandle(IDistributedSynchronizationHandle innerHandle)
 {
     this._innerHandle = innerHandle;
 }
Beispiel #4
0
 public FailsafeHandle(IDistributedSynchronizationHandle handle)
 {
     _handle = handle;
 }
 public Result(IDistributedSynchronizationHandle handle)
 {
     this.Handle           = handle;
     this.Retry            = MultiplexedConnectionLockRetry.NoRetry;
     this.CanSafelyDispose = false; // since we have handle
 }
 internal PostgresDistributedReaderWriterLockHandle(IDistributedSynchronizationHandle innerHandle)
 {
     this._innerHandle = innerHandle;
 }
 public ManagedFinalizationDistributedLockHandle(IDistributedSynchronizationHandle innerHandle)
 {
     this._innerHandle           = innerHandle;
     this._finalizerRegistration = ManagedFinalizerQueue.Instance.Register(this, innerHandle);
 }
 public MedallionAbpDistributedLockHandle(IDistributedSynchronizationHandle handle)
 {
     Handle = handle;
 }