//attributed.AttributedMetadataModule //public void Testing() //{ // Debug.WriteLine("Jekkkkkk"); //} public Transaction4LogicAttribute() { this.settings = new TransactionAttributeSettings(); }
protected virtual object CloseUnitOfWork( TransactionAttributeSettings transactionAttributeSettings, object transactionState, Exception err) { if (err == null) { try { _session.Flush(); transactionState = this.transactionManager.CommitTransaction( transactionState); } catch (Exception) { transactionState = this.transactionManager.RollbackTransaction( transactionState); transactionState = this.transactionManager.PopTransaction(transactionState); throw; } } else { transactionState = this.transactionManager.RollbackTransaction( transactionState); } transactionState = this.transactionManager.PopTransaction( transactionState); return transactionState; }
private object OnSuccess(TransactionAttributeSettings transactionAttributeSettings, object transactionState) { return this.CloseUnitOfWork(transactionAttributeSettings, transactionState, null); }
private TransactionAttributeSettings GetTransactionAttributeSettings( ITransactionAttributeSettings[] methodAttributes, ITransactionAttributeSettings[] classAttributes) { var transactionAttributeSettings = new TransactionAttributeSettings(); if (methodAttributes.Length > 0) { transactionAttributeSettings = methodAttributes[methodAttributes.Length - 1].Settings; } else if (classAttributes.Length > 0) { transactionAttributeSettings = classAttributes[classAttributes.Length - 1].Settings; } return transactionAttributeSettings; }
private object OnEntry(TransactionAttributeSettings transactionAttributeSettings, object transactionState) { return this.transactionManager.PushTransaction(transactionState); }