Example #1
0
        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);
        }
Example #2
0
        public IMessageScope CreateScope(IMessage message, IRichMessageDescriptor messageDescriptor)
        {
            var coreSessionProvider = new MessageCoreSessionProvider(message, messageDescriptor);

            return(new MessageScope(_iocManager, coreSessionProvider));
        }