public void DeleteQueuesForEndpoint()
    {
        QueueDeletion.DeleteQueuesForEndpoint(
            uri: "amqp://*****:*****@localhost:5672",
            endpointName: "myendpoint");


        QueueDeletion.DeleteQueue(
            uri: "amqp://*****:*****@localhost:5672",
            queueName: "error");
        QueueDeletion.DeleteQueue(
            uri: "amqp://*****:*****@localhost:5672",
            queueName: "audit");
    }
示例#2
0
    public void DeleteSharedQueues()
    {
        string connectionString = @"Data Source=.\SQLEXPRESS;Initial Catalog=samples;Integrated Security=True";

        using (SqlConnection sqlConnection = new SqlConnection(connectionString))
        {
            sqlConnection.Open();
            QueueDeletion.DeleteQueue(
                connection: sqlConnection,
                schema: "dbo",
                queueName: "audit");
            QueueDeletion.DeleteQueue(
                connection: sqlConnection,
                schema: "dbo",
                queueName: "error");
        }
    }
示例#3
0
    public async Task DeleteSharedQueues()
    {
        var connectionString = @"Data Source=.\SQLEXPRESS;Initial Catalog=samples;Integrated Security=True";

        using (var sqlConnection = new SqlConnection(connectionString))
        {
            await sqlConnection.OpenAsync()
            .ConfigureAwait(false);

            await QueueDeletion.DeleteQueue(
                connection : sqlConnection,
                schema : "dbo",
                queueName : "audit")
            .ConfigureAwait(false);

            await QueueDeletion.DeleteQueue(
                connection : sqlConnection,
                schema : "dbo",
                queueName : "error")
            .ConfigureAwait(false);
        }
    }