コード例 #1
0
        private ServiceBusSender GetOrAddMessageSender(string entityPath, string connectionString)
        {
            ServiceBusClient client = _clientCache.GetOrAdd(connectionString, CreateClient(connectionString));

            return(_messageSenderCache.GetOrAdd(entityPath, client.CreateSender(entityPath)));
        }
コード例 #2
0
 public static ServiceBusTriggerInput CreateSingle(ServiceBusReceivedMessage message, ServiceBusMessageActions messageActions, ServiceBusReceiveActions receiveActions, ServiceBusClient client)
 {
     return(new ServiceBusTriggerInput
     {
         Messages = new ServiceBusReceivedMessage[]
         {
             message
         },
         _isSingleDispatch = true,
         MessageActions = messageActions,
         ReceiveActions = receiveActions,
         Client = client
     });
 }
コード例 #3
0
 public static ServiceBusTriggerInput CreateBatch(ServiceBusReceivedMessage[] messages, ServiceBusMessageActions messageActions, ServiceBusReceiveActions receiveActions, ServiceBusClient client)
 {
     return(new ServiceBusTriggerInput
     {
         Messages = messages,
         _isSingleDispatch = false,
         MessageActions = messageActions,
         ReceiveActions = receiveActions,
         Client = client
     });
 }
コード例 #4
0
 public SessionMessageProcessor(ServiceBusClient client, ServiceBusSessionProcessor processor)
 {
     Processor = processor ?? throw new ArgumentNullException(nameof(processor));
     Client    = client ?? throw new ArgumentNullException(nameof(client));
 }