static private Create ( string message, Exception innerException, Guid distributedTxId ) : |
||
message | string | |
innerException | Exception | |
distributedTxId | Guid | |
Résultat |
internal static TransactionException Create(string message, Exception innerException, Guid distributedTxId)
{
string messagewithTxId = message;
if (IncludeDistributedTxId(distributedTxId))
messagewithTxId = string.Format(SR.DistributedTxIDInTransactionException, messagewithTxId, distributedTxId);
return Create(messagewithTxId, innerException);
}
TransactionException::Create ( TraceSourceType traceSource, string message, Exception innerException ) : |
|
TransactionException::Create ( TraceSourceType traceSource, string message, Exception innerException, Guid distributedTxId ) : |
|
TransactionException::Create ( TraceSourceType traceSource, string message, Guid distributedTxId ) : |
|
TransactionException::Create ( string message, Exception innerException ) : |
|
TransactionException::Create ( string message, Guid distributedTxId ) : |
private void PushServiceDomain(Transaction newCurrent) { if (((newCurrent == null) || !newCurrent.Equals(ContextUtil.SystemTransaction)) && ((newCurrent != null) || (ContextUtil.SystemTransaction != null))) { ServiceConfig cfg = new ServiceConfig(); try { if (newCurrent != null) { cfg.Synchronization = SynchronizationOption.RequiresNew; ServiceDomain.Enter(cfg); this.createdDoubleServiceDomain = true; cfg.Synchronization = SynchronizationOption.Required; cfg.BringYourOwnSystemTransaction = newCurrent; } ServiceDomain.Enter(cfg); this.createdServiceDomain = true; } catch (COMException exception) { if (System.Transactions.Oletx.NativeMethods.XACT_E_NOTRANSACTION == exception.ErrorCode) { throw TransactionException.Create(System.Transactions.SR.GetString("TraceSourceBase"), System.Transactions.SR.GetString("TransactionAlreadyOver"), exception); } throw TransactionException.Create(System.Transactions.SR.GetString("TraceSourceBase"), exception.Message, exception); } finally { if (!this.createdServiceDomain && this.createdDoubleServiceDomain) { ServiceDomain.Leave(); } } } }