public IMessageScope CreateScope(IMessage message, IRichMessageDescriptor messageDescriptor) { var sessionProvider = new MessageCoreSessionProvider(message, messageDescriptor); var scope = _lifetimeScope.BeginLifetimeScope(builder => { builder.RegisterInstance(sessionProvider) .As <ICoreSessionProvider>() .PropertiesAutowired(); }); var messageScope = new MessageScope(scope); return(messageScope); }
public IMessageScope CreateScope(IMessage message, IRichMessageDescriptor messageDescriptor) { var coreSessionProvider = new MessageCoreSessionProvider(message, messageDescriptor); return(new MessageScope(_iocManager, coreSessionProvider)); }