/// <summary> /// Gets the transaction information for the current transaction /// </summary> /// <returns></returns> public static TransactionInformation GetTransactionInformation() { if (CurrentRavenTransactions.Count > 0) { return(CurrentRavenTransactions.Peek()); } if (Transaction.Current == null) { return(null); } return(new TransactionInformation { Id = PromotableRavenClientEnlistment.GetLocalOrDistributedTransactionId(Transaction.Current.TransactionInformation), Timeout = DefaultTimeout ?? TransactionManager.DefaultTimeout }); }
/// <summary> /// Gets the transaction information for the current transaction /// </summary> /// <returns></returns> public static TransactionInformation GetTransactionInformation() { if (CurrentRavenTransactions.Count > 0 && supressExplicitRavenTransaction == false) { return(CurrentRavenTransactions.Peek()); } if (Transaction.Current == null) { return(null); } return(new TransactionInformation { Id = Transaction.Current.TransactionInformation.LocalIdentifier, Timeout = DefaultTimeout ?? TransactionManager.DefaultTimeout }); }