public ISession WrapWithAutoTransaction(ISession realSession, SessionCloseDelegate closeDelegate, SessionDisposeDelegate disposeDelegate) { if (IsWrapped(realSession)) { return realSession; } var wrapper = new AutoTransactionProtectionWrapper(realSession, closeDelegate, disposeDelegate); return GenerateProxy(realSession, wrapper); }
public ISession WrapWithAutoTransaction(ISession realSession, SessionCloseDelegate closeDelegate, SessionDisposeDelegate disposeDelegate) { if (IsWrapped(realSession)) { return(realSession); } var wrapper = new AutoTransactionProtectionWrapper(realSession, closeDelegate, disposeDelegate); return(GenerateProxy(realSession, wrapper)); }