/// <inheritdoc /> public async Task Apply(IBindingTarget target) { if (!bindingInfo.IsObsolete) { switch (bindingInfo.BindingTargetMode) { case BindingTargetMode.Default: if (bindingInfo.QueueInfo.QueueType == QueueType.Dynamic) { QueueName = await target.BindDynamic(bindingInfo.MessageClass, bindingInfo.QueueInfo.Name); } else { await target.BindDurable(bindingInfo.MessageClass, bindingInfo.QueueInfo.Name); QueueName = bindingInfo.QueueInfo.Name; } break; case BindingTargetMode.Direct: if (bindingInfo.QueueInfo.QueueType == QueueType.Dynamic) { QueueName = await target.BindDynamicDirect(bindingInfo.MessageClass, bindingInfo.QueueInfo.Name); } else { await target.BindDurableDirect(bindingInfo.QueueInfo.Name); QueueName = bindingInfo.QueueInfo.Name; } break; default: throw new ArgumentOutOfRangeException(nameof(bindingInfo.BindingTargetMode), bindingInfo.BindingTargetMode, "Invalid BindingTargetMode"); } } else if (bindingInfo.QueueInfo.QueueType == QueueType.Durable) { await target.BindDurableObsolete(bindingInfo.QueueInfo.Name); QueueName = bindingInfo.QueueInfo.Name; } }
/// <inheritdoc /> public async Task Apply(IBindingTarget target) { QueueName = await target.BindDynamicDirect(dynamicQueuePrefix); router.TransientResponseQueueName = QueueName; }