コード例 #1
0
        public static QueueClient Create(ServiceBusEntityConnection entityConnection, ReceiveMode mode)
        {
            if (entityConnection == null)
            {
                throw Fx.Exception.Argument(nameof(entityConnection), "Namespace Connection is null. Create a connection using the NamespaceConnection class");
            }

            return(entityConnection.CreateQueueClient(entityConnection.EntityPath, mode));
        }
コード例 #2
0
        public static QueueClient CreateFromConnectionString(string entityConnectionString, ReceiveMode mode)
        {
            if (string.IsNullOrWhiteSpace(entityConnectionString))
            {
                throw Fx.Exception.ArgumentNullOrWhiteSpace(nameof(entityConnectionString));
            }

            ServiceBusEntityConnection entityConnection = new ServiceBusEntityConnection(entityConnectionString);

            return(entityConnection.CreateQueueClient(entityConnection.EntityPath, mode));
        }