Skip to content

Commit 58fd328

Browse files
authored
Merge pull request #104 from rabbitmq/lukebakken/connection-xmldoc
`IConnection` XML docs
2 parents 4e9a036 + 917cc19 commit 58fd328

File tree

8 files changed

+370
-253
lines changed

8 files changed

+370
-253
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// This source code is dual-licensed under the Apache License, version 2.0,
2+
// and the Mozilla Public License, version 2.0.
3+
// Copyright (c) 2017-2024 Broadcom. All Rights Reserved. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
4+
5+
using System;
6+
7+
namespace RabbitMQ.AMQP.Client
8+
{
9+
/// <summary>
10+
/// Exception related to <see cref="IConnection"/>
11+
/// </summary>
12+
public class ConnectionException : Exception
13+
{
14+
/// <summary>
15+
/// Create a <see cref="ConnectionException"/> with the specified message.
16+
/// </summary>
17+
public ConnectionException(string message) : base(message)
18+
{
19+
}
20+
21+
/// <summary>
22+
/// Create a <see cref="ConnectionException"/> with the specified message and inner <see cref="Exception"/>.
23+
/// </summary>
24+
public ConnectionException(string message, Exception innerException) : base(message, innerException)
25+
{
26+
}
27+
}
28+
}

RabbitMQ.AMQP.Client/IConnection.cs

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,63 @@
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.Collections.Generic;
76

87
namespace RabbitMQ.AMQP.Client
98
{
10-
public class ConnectionException : Exception
11-
{
12-
public ConnectionException(string message) : base(message)
13-
{
14-
}
15-
16-
public ConnectionException(string message, Exception innerException) : base(message, innerException)
17-
{
18-
}
19-
}
20-
219
public interface IConnection : ILifeCycle
2210
{
11+
/// <summary>
12+
/// The <see cref="IManagement"/> instance for this connection.
13+
/// </summary>
14+
/// <returns><see cref="IManagement"/> instance for this connection.</returns>
2315
IManagement Management();
2416

17+
/// <summary>
18+
/// Create an <see cref="IPublisherBuilder"/> instance for this connection.
19+
/// </summary>
20+
/// <returns><see cref="IPublisherBuilder"/> instance for this connection.</returns>
2521
IPublisherBuilder PublisherBuilder();
2622

23+
/// <summary>
24+
/// Create an <see cref="IConsumerBuilder"/> instance for this connection.
25+
/// </summary>
26+
/// <returns><see cref="IConsumerBuilder"/> instance for this connection.</returns>
2727
IConsumerBuilder ConsumerBuilder();
2828

29+
/// <summary>
30+
/// Create an <see cref="IRpcServerBuilder"/> instance for this connection.
31+
/// </summary>
32+
/// <returns><see cref="IRpcServerBuilder"/> instance for this connection.</returns>
2933
IRpcServerBuilder RpcServerBuilder();
3034

35+
/// <summary>
36+
/// Create an <see cref="IRpcClientBuilder"/> instance for this connection.
37+
/// </summary>
38+
/// <returns><see cref="IRpcClientBuilder"/> instance for this connection.</returns>
3139
IRpcClientBuilder RpcClientBuilder();
3240

41+
/// <summary>
42+
/// Get the properties for this connection.
43+
/// </summary>
44+
/// <returns><see cref="IReadOnlyDictionary{TKey, TValue}"/> of connection properties.</returns>
3345
public IReadOnlyDictionary<string, object> Properties { get; }
3446

47+
/// <summary>
48+
/// Get the <see cref="IPublisher"/> instances associated with this connection.
49+
/// </summary>
50+
/// <returns><see cref="IEnumerable{T}"/> of <see cref="IPublisher"/> instances.</returns>
3551
public IEnumerable<IPublisher> Publishers { get; }
3652

53+
/// <summary>
54+
/// Get the <see cref="IConsumer"/> instances associated with this connection.
55+
/// </summary>
56+
/// <returns><see cref="IEnumerable{T}"/> of <see cref="IConsumer"/> instances.</returns>
3757
public IEnumerable<IConsumer> Consumers { get; }
3858

59+
/// <summary>
60+
/// Get or set the Connection ID. Used by <see cref="IEnvironment"/>
61+
/// </summary>
3962
public long Id { get; set; }
4063
}
4164
}

0 commit comments

Comments
 (0)