public static void Test() { ServiceProxy proxy = new ServiceProxy(); using (SoaServiceCallContext soaContext = new SoaServiceCallContext(true, true)) { soaContext.BeginRecordLogTrackEvent += SoaContext_BeginRecordLogTrackEvent; soaContext.TransactionEndHander += SoaContext_TransactionEndHander; proxy.SetTicketPrice("1", 2); TransactionActionInfo t = new TransactionActionInfo(); LogTrackLocation l = new LogTrackLocation(); soaContext.Run(t, l); } }
public void Run(TransactionActionInfo tr, LogTrackLocation log) { transactionEndHander(tr); beginRecordLogTrackHander(log); }
private static void SoaContext_TransactionEndHander(TransactionActionInfo arg) { i += 1; }
static void soaContext_TransactionEndEvent(TransactionActionInfo arg) { //查看事务处理信息 //throw new NotImplementedException(); }
private static void Context_TransactionEndEvent(TransactionActionInfo arg) { Console.WriteLine(arg.Info); }
private static void SoaContext_TransactionEndEvent(TransactionActionInfo arg) { throw new NotImplementedException(); }