// This is a static validation (so only %% are resolved; not {} ) // For runtime validation, the regular builder functions can do the resolution. private void ValidateQueueAttribute(QueueAttribute attribute, Type parameterType) { string queueName = NormalizeQueueName(attribute, null); // Queue pre-existing behavior: if there are { }in the path, then defer validation until runtime. if (!queueName.Contains("{")) { QueueClientExtensions.ValidateQueueName(queueName); } }
internal QueueClient GetQueue(QueueAttribute attrResolved) { var client = _queueServiceClientProvider.Get(attrResolved.Connection); string queueName = attrResolved.QueueName.ToLowerInvariant(); QueueClientExtensions.ValidateQueueName(queueName); return(client.GetQueueClient(queueName)); }
private static string NormalizeAndValidate(string queueName) { queueName = queueName.ToLowerInvariant(); // must be lowercase. coerce here to be nice. QueueClientExtensions.ValidateQueueName(queueName); return(queueName); }