Esempio n. 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>());
        }
Esempio n. 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>());
        }