void AddReceiveContextPayloads(ReceiveContext receiveContext, IMessageSession messageSession) { var sessionContext = new BrokeredMessageSessionContext(messageSession); receiveContext.GetOrAddPayload <IReceiverClient>(() => messageSession); receiveContext.GetOrAddPayload(() => sessionContext); receiveContext.GetOrAddPayload(() => _context.GetPayload <NamespaceContext>()); }
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>()); }