System.Transactions.VolatileDemultiplexer.InternalPrepare C# (CSharp) Method

InternalPrepare() protected abstract method

protected abstract InternalPrepare ( ) : void
return void
        protected abstract void InternalPrepare();

Usage Example

Example #1
0
        protected static void PoolablePrepare(object state)
        {
            VolatileDemultiplexer demultiplexer = (VolatileDemultiplexer)state;
            bool lockTaken = false;

            try
            {
                Monitor.TryEnter(demultiplexer.transaction, 250, ref lockTaken);
                if (lockTaken)
                {
                    demultiplexer.InternalPrepare();
                }
                else if (!ThreadPool.QueueUserWorkItem(PrepareCallback, demultiplexer))
                {
                    throw TransactionException.CreateInvalidOperationException(System.Transactions.SR.GetString("TraceSourceLtm"), System.Transactions.SR.GetString("UnexpectedFailureOfThreadPool"), null);
                }
            }
            finally
            {
                if (lockTaken)
                {
                    Monitor.Exit(demultiplexer.transaction);
                }
            }
        }
All Usage Examples Of System.Transactions.VolatileDemultiplexer::InternalPrepare