Пример #1
0
        void AddReceiveContextPayloads(ReceiveContext receiveContext, IMessageSession messageSession)
        {
            var sessionContext = new BrokeredMessageSessionContext(messageSession);

            receiveContext.GetOrAddPayload <IReceiverClient>(() => messageSession);
            receiveContext.GetOrAddPayload(() => sessionContext);
            receiveContext.GetOrAddPayload(() => _context.GetPayload <NamespaceContext>());
        }
Пример #2
0
        void AddReceiveContextPayloads(ReceiveContext receiveContext, IMessageSession messageSession, Message message)
        {
            MessageSessionContext sessionContext = new BrokeredMessageSessionContext(messageSession);
            MessageLockContext    lockContext    = new SessionMessageLockContext(messageSession, message);

            receiveContext.GetOrAddPayload(() => sessionContext);
            receiveContext.GetOrAddPayload(() => lockContext);
            receiveContext.GetOrAddPayload(() => _context.GetPayload <NamespaceContext>());
        }