Skip to content

Commit 76e336c

Browse files
committed
IManagement XML docs
* Also add docs to implementing classes. * Re-order methods in classes to be public, protected, internal, private. * Add XML docs to management exceptions.
1 parent fc527dc commit 76e336c

File tree

5 files changed

+342
-263
lines changed

5 files changed

+342
-263
lines changed

RabbitMQ.AMQP.Client/IManagement.cs

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,64 @@
22
// and the Mozilla Public License, version 2.0.
33
// Copyright (c) 2017-2024 Broadcom. All Rights Reserved. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
44

5-
using System;
65
using System.Threading;
76
using System.Threading.Tasks;
87

98
namespace RabbitMQ.AMQP.Client
109
{
11-
public class ModelException : Exception
12-
{
13-
public ModelException(string message) : base(message)
14-
{
15-
}
16-
}
17-
18-
public class PreconditionFailedException : Exception
19-
{
20-
public PreconditionFailedException(string message) : base(message)
21-
{
22-
}
23-
}
24-
25-
public class BadRequestException : Exception
26-
{
27-
public BadRequestException(string message) : base(message)
28-
{
29-
}
30-
}
31-
3210
/// <summary>
33-
/// IManagement interface and is responsible for managing the AMQP resources.
34-
/// RabbitMQ uses AMQP end point: "/management" to manage the resources like queues, exchanges, and bindings.
35-
/// The management endpoint works like an HTTP RPC endpoint where the client sends a request to the server.
11+
/// The <see cref="IManagement"/> interface is used to manage the
12+
/// <see href="https://www.rabbitmq.com/tutorials/amqp-concepts">AMQP 0.9.1 model</see>
13+
/// topology (exchanges, queues, and bindings).
3614
/// </summary>
3715
public interface IManagement : ILifeCycle
3816
{
17+
/// <summary>
18+
/// Create an <see cref="IQueueSpecification"/>, with an auto-generated name.
19+
/// </summary>
20+
/// <returns>A builder for <see cref="IQueueSpecification"/></returns>
3921
IQueueSpecification Queue();
22+
23+
/// <summary>
24+
/// Create an <see cref="IQueueSpecification"/>, with the given name.
25+
/// </summary>
26+
/// <returns>A builder for <see cref="IQueueSpecification"/></returns>
4027
IQueueSpecification Queue(string name);
4128

29+
/// <summary>
30+
/// Get the <see cref="IQueueInfo"/> for the given queue specification.
31+
/// </summary>
32+
/// <param name="queueSpec">The <see cref="IQueueSpecification"/></param>
33+
/// <param name="cancellationToken">The <see cref="CancellationToken"/></param>
34+
/// <returns>The <see cref="IQueueInfo"/> for the given spec.</returns>
4235
Task<IQueueInfo> GetQueueInfoAsync(IQueueSpecification queueSpec,
4336
CancellationToken cancellationToken = default);
37+
38+
/// <summary>
39+
/// Get the <see cref="IQueueInfo"/> for the given queue name.
40+
/// </summary>
41+
/// <param name="queueName">The queue name</param>
42+
/// <param name="cancellationToken">The <see cref="CancellationToken"/></param>
43+
/// <returns>The <see cref="IQueueInfo"/> for the given spec.</returns>
4444
Task<IQueueInfo> GetQueueInfoAsync(string queueName,
4545
CancellationToken cancellationToken = default);
4646

47+
/// <summary>
48+
/// Create an <see cref="IExchangeSpecification"/>, with an auto-generated name.
49+
/// </summary>
50+
/// <returns>A builder for <see cref="IExchangeSpecification"/></returns>
4751
IExchangeSpecification Exchange();
52+
53+
/// <summary>
54+
/// Create an <see cref="IExchangeSpecification"/>, with the given name.
55+
/// </summary>
56+
/// <returns>A builder for <see cref="IExchangeSpecification"/></returns>
4857
IExchangeSpecification Exchange(string name);
4958

59+
/// <summary>
60+
/// Create an <see cref="IBindingSpecification"/>.
61+
/// </summary>
62+
/// <returns>A builder for <see cref="IBindingSpecification"/></returns>
5063
IBindingSpecification Binding();
5164
}
5265

0 commit comments

Comments
 (0)