public void Serializability() { TransactionInterceptor ti = new TransactionInterceptor(); ti.TransactionAttributes = new NameValueCollection(); TransactionAttributeSourceAdvisor tas = new TransactionAttributeSourceAdvisor(ti); SerializationTestUtils.SerializeAndDeserialize(tas); }
public void Serializability() { TransactionInterceptor ti = new TransactionInterceptor(); ti.TransactionAttributes = new NameValueCollection(); TransactionAttributeSourceAdvisor tas = new TransactionAttributeSourceAdvisor(ti); SerializationTestUtils.SerializeAndDeserialize(tas); }
/// <summary> /// Sets the tx attribute source. /// </summary> /// <param name="transactionInterceptor">The transaction interceptor.</param> protected void SetTxAttributeSource(TransactionInterceptor transactionInterceptor) { if (transactionInterceptor.TransactionAttributeSource == null) { throw new AopConfigException("Cannot construct a TransactionAttributeSourceAdvisor using a " + "TransactionInterceptor that has no TransactionAttributeSource configured."); } _transactionAttributeSource = transactionInterceptor.TransactionAttributeSource; }
protected override object Advised(object target, IPlatformTransactionManager ptm, ITransactionAttributeSource tas) { TransactionInterceptor ti = new TransactionInterceptor(); ti.TransactionManager = ptm; Assert.AreEqual(ptm, ti.TransactionManager); ti.TransactionAttributeSource = tas; Assert.AreEqual(tas, ti.TransactionAttributeSource); ProxyFactory pf = new ProxyFactory(target); pf.AddAdvice(0, ti); return pf.GetProxy(); }
protected override object Advised(object target, IPlatformTransactionManager ptm, ITransactionAttributeSource tas) { TransactionInterceptor ti = new TransactionInterceptor(); ti.TransactionManager = ptm; Assert.AreEqual(ptm, ti.TransactionManager); ti.TransactionAttributeSource = tas; Assert.AreEqual(tas, ti.TransactionAttributeSource); ProxyFactory pf = new ProxyFactory(target); pf.AddAdvice(0, ti); return(pf.GetProxy()); }
/// <summary> /// Creates a new instance of the /// <see cref="Spring.Transaction.Interceptor.TransactionProxyFactoryObject"/> class. /// </summary> public TransactionProxyFactoryObject() { _transactionInterceptor = new TransactionInterceptor(); }
/// <summary> /// Creates a new instance of the /// <see cref="Spring.Transaction.Interceptor.TransactionProxyFactoryObject"/> class. /// </summary> public TransactionProxyFactoryObject() { _transactionInterceptor = new TransactionInterceptor(); }
/// <summary> /// Creates a new instance of the /// <see cref="Spring.Transaction.Interceptor.TransactionAttributeSourceAdvisor"/> class. /// </summary> /// <param name="transactionInterceptor"> /// The pre-configured transaction interceptor. /// </param> public TransactionAttributeSourceAdvisor(TransactionInterceptor transactionInterceptor) : base(transactionInterceptor) { SetTxAttributeSource(transactionInterceptor); }
/// <summary> /// Creates a new instance of the /// <see cref="Spring.Transaction.Interceptor.TransactionAttributeSourceAdvisor"/> class. /// </summary> /// <param name="transactionInterceptor"> /// The pre-configured transaction interceptor. /// </param> public TransactionAttributeSourceAdvisor( TransactionInterceptor transactionInterceptor ) : base( transactionInterceptor ) { SetTxAttributeSource(transactionInterceptor); }
/// <summary> /// Sets the tx attribute source. /// </summary> /// <param name="transactionInterceptor">The transaction interceptor.</param> protected void SetTxAttributeSource(TransactionInterceptor transactionInterceptor) { if (transactionInterceptor.TransactionAttributeSource == null) { throw new AopConfigException("Cannot construct a TransactionAttributeSourceAdvisor using a " + "TransactionInterceptor that has no TransactionAttributeSource configured."); } _transactionAttributeSource = transactionInterceptor.TransactionAttributeSource; }