private ISession GenerateProxy(ISession realSession, TransactionProtectionWrapper wrapper) { var wrapped = (ISession) proxyGenerator.CreateInterfaceProxyWithTarget(typeof (ISession), Commons.SessionProxyInterfaces, realSession, wrapper); return wrapped; }
private ISession GenerateProxy(ISession realSession, TransactionProtectionWrapper wrapper) { var wrapped = (ISession)proxyGenerator.CreateInterfaceProxyWithTarget(typeof(ISession), Commons.SessionProxyInterfaces, realSession, wrapper); return(wrapped); }
public ISession Wrap(ISession realSession, SessionCloseDelegate closeDelegate, SessionDisposeDelegate disposeDelegate) { if (IsWrapped(realSession)) { return realSession; } var wrapper = new TransactionProtectionWrapper(realSession, closeDelegate, disposeDelegate); return GenerateProxy(realSession, wrapper); }
public ISession Wrap(ISession realSession, SessionCloseDelegate closeDelegate, SessionDisposeDelegate disposeDelegate) { if (IsWrapped(realSession)) { return(realSession); } var wrapper = new TransactionProtectionWrapper(realSession, closeDelegate, disposeDelegate); return(GenerateProxy(realSession, wrapper)); }