Example #1
0
            public void InitialiseScope(
                IServiceProvider scopedServiceProvider,
                TTransportMessage transportMessage)
            {
                ISetExecutionContext <TTransportMessage> executionContextSetter =
                    scopedServiceProvider
                    .GetService <ISetExecutionContext <TTransportMessage> >();
                Guid id = _scopeId;

                executionContextSetter.Id = id;
                executionContextSetter.TransportMessage = transportMessage;
            }
Example #2
0
        public void InitialiseScope(
            IServiceProvider scopedServiceProvider,
            TransportMessage transportMessage)
        {
            ISetExecutionContext <TransportMessage> executionContextSetter = scopedServiceProvider
                                                                             .GetService <ISetExecutionContext <TransportMessage> >();

            _scopeId.HeadAndTail().Match(
                ht =>
            {
                Guid id  = ht.Item1;
                _scopeId = ht.Item2.ToList();
                executionContextSetter.Id = id;
                executionContextSetter.TransportMessage = transportMessage;
            },
                () => throw new Exception("ran out of scopeId's")
                );
        }