@@ -24,7 +24,6 @@ public static Overview GetOverview(
24
24
. GetResult ( ) ;
25
25
}
26
26
27
-
28
27
/// <summary>
29
28
/// A list of nodes in the RabbitMQ cluster.
30
29
/// </summary>
@@ -74,6 +73,24 @@ public static IReadOnlyList<Connection> GetConnections(
74
73
. GetResult ( ) ;
75
74
}
76
75
76
+ /// <summary>
77
+ /// A list of all open connections on the specified VHost.
78
+ /// </summary>
79
+ /// <param name="client"></param>
80
+ /// <param name="vhostName"></param>
81
+ /// <param name="cancellationToken"></param>
82
+ /// <returns></returns>
83
+ public static IReadOnlyList < Connection > GetConnections (
84
+ this IManagementClient client ,
85
+ string vhostName ,
86
+ CancellationToken cancellationToken = default
87
+ )
88
+ {
89
+ return client . GetConnectionsAsync ( vhostName , cancellationToken )
90
+ . GetAwaiter ( )
91
+ . GetResult ( ) ;
92
+ }
93
+
77
94
/// <summary>
78
95
/// A list of all open channels.
79
96
/// </summary>
@@ -91,7 +108,25 @@ public static IReadOnlyList<Channel> GetChannels(
91
108
}
92
109
93
110
/// <summary>
94
- /// A list of all open channels.
111
+ /// A list of all open channels for the given connection.
112
+ /// </summary>
113
+ /// <param name="client"></param>
114
+ /// <param name="connectionName"></param>
115
+ /// <param name="cancellationToken"></param>
116
+ /// <returns></returns>
117
+ public static IReadOnlyList < Channel > GetChannels (
118
+ this IManagementClient client ,
119
+ string connectionName ,
120
+ CancellationToken cancellationToken = default
121
+ )
122
+ {
123
+ return client . GetChannelsAsync ( connectionName , cancellationToken )
124
+ . GetAwaiter ( )
125
+ . GetResult ( ) ;
126
+ }
127
+
128
+ /// <summary>
129
+ /// A list of all open channels for the given connection.
95
130
/// </summary>
96
131
/// <param name="client"></param>
97
132
/// <param name="connection"></param>
@@ -103,6 +138,24 @@ public static Task<IReadOnlyList<Channel>> GetChannelsAsync(
103
138
CancellationToken cancellationToken = default
104
139
) => client . GetChannelsAsync ( connection . Name , cancellationToken ) ;
105
140
141
+ /// <summary>
142
+ /// A list of all open channels for the given connection.
143
+ /// </summary>
144
+ /// <param name="client"></param>
145
+ /// <param name="connection"></param>
146
+ /// <param name="cancellationToken"></param>
147
+ /// <returns></returns>
148
+ public static IReadOnlyList < Channel > GetChannels (
149
+ this IManagementClient client ,
150
+ Connection connection ,
151
+ CancellationToken cancellationToken = default
152
+ )
153
+ {
154
+ return client . GetChannelsAsync ( connection , cancellationToken )
155
+ . GetAwaiter ( )
156
+ . GetResult ( ) ;
157
+ }
158
+
106
159
/// <summary>
107
160
/// Gets the channel. This returns more detail, including consumers than the GetChannels method.
108
161
/// </summary>
@@ -139,6 +192,24 @@ public static IReadOnlyList<Exchange> GetExchanges(
139
192
. GetResult ( ) ;
140
193
}
141
194
195
+ /// <summary>
196
+ /// A list of all exchanges for a virtual host.
197
+ /// </summary>
198
+ /// <param name="client"></param>
199
+ /// <param name="vhostName"></param>
200
+ /// <param name="cancellationToken"></param>
201
+ /// <returns></returns>
202
+ public static IReadOnlyList < Exchange > GetExchanges (
203
+ this IManagementClient client ,
204
+ string vhostName ,
205
+ CancellationToken cancellationToken = default
206
+ )
207
+ {
208
+ return client . GetExchangesAsync ( vhostName , cancellationToken )
209
+ . GetAwaiter ( )
210
+ . GetResult ( ) ;
211
+ }
212
+
142
213
/// <summary>
143
214
/// A list of all queues.
144
215
/// </summary>
@@ -155,6 +226,24 @@ public static IReadOnlyList<Queue> GetQueues(
155
226
. GetResult ( ) ;
156
227
}
157
228
229
+ /// <summary>
230
+ /// A list of all queues for a virtual host.
231
+ /// </summary>
232
+ /// <param name="client"></param>
233
+ /// <param name="vhostName"></param>
234
+ /// <param name="cancellationToken"></param>
235
+ /// <returns></returns>
236
+ public static IReadOnlyList < Queue > GetQueues (
237
+ this IManagementClient client ,
238
+ string vhostName ,
239
+ CancellationToken cancellationToken = default
240
+ )
241
+ {
242
+ return client . GetQueuesAsync ( vhostName , cancellationToken )
243
+ . GetAwaiter ( )
244
+ . GetResult ( ) ;
245
+ }
246
+
158
247
/// <summary>
159
248
/// A list of all queues for a virtual host.
160
249
/// </summary>
@@ -239,6 +328,17 @@ public static PageResult<Queue> GetQueuesByPage(
239
328
. GetResult ( ) ;
240
329
}
241
330
331
+ /// <summary>
332
+ /// A list of all queues without stats.
333
+ /// </summary>
334
+ /// <param name="client"></param>
335
+ /// <param name="cancellationToken"></param>
336
+ /// <returns></returns>
337
+ public static IReadOnlyList < QueueWithoutStats > GetQueuesWithoutStats (
338
+ this IManagementClient client ,
339
+ CancellationToken cancellationToken = default
340
+ ) => client . GetQueuesWithoutStatsAsync ( cancellationToken ) . GetAwaiter ( ) . GetResult ( ) ;
341
+
242
342
/// <summary>
243
343
/// A list of all bindings.
244
344
/// </summary>
@@ -1658,13 +1758,13 @@ public static Parameter GetShovel(
1658
1758
string vhostName ,
1659
1759
string shovelName ,
1660
1760
CancellationToken cancellationToken = default
1661
- )
1662
- {
1663
- return client . GetParameterAsync ( vhostName , "shovel" , shovelName , cancellationToken )
1664
- . GetAwaiter ( )
1665
- . GetResult ( ) ;
1761
+ )
1762
+ {
1763
+ return client . GetParameterAsync ( vhostName , "shovel" , shovelName , cancellationToken )
1764
+ . GetAwaiter ( )
1765
+ . GetResult ( ) ;
1666
1766
}
1667
-
1767
+
1668
1768
/// <summary>
1669
1769
/// Creates a federation upstream in a specific vhost
1670
1770
/// </summary>
@@ -1680,7 +1780,7 @@ public static Task CreateFederationUpstreamAsync(
1680
1780
ParameterFederationValue federationUpstreamDescription ,
1681
1781
CancellationToken cancellationToken = default
1682
1782
) => client . CreateParameterAsync ( "federation-upstream" , vhostName , federationUpstreamName , federationUpstreamDescription , cancellationToken ) ;
1683
-
1783
+
1684
1784
/// <summary>
1685
1785
/// Creates a federation upstream in a specific vhost
1686
1786
/// </summary>
@@ -1695,11 +1795,11 @@ public static void CreateFederationUpstream(
1695
1795
string federationUpstreamName ,
1696
1796
ParameterFederationValue federationUpstreamDescription ,
1697
1797
CancellationToken cancellationToken = default
1698
- )
1699
- {
1798
+ )
1799
+ {
1700
1800
client . CreateParameterAsync ( "federation-upstream" , vhostName , federationUpstreamName , federationUpstreamDescription , cancellationToken )
1701
1801
. GetAwaiter ( )
1702
- . GetResult ( ) ;
1802
+ . GetResult ( ) ;
1703
1803
}
1704
1804
1705
1805
/// <summary>
@@ -1728,10 +1828,10 @@ public static Parameter GetFederationUpstream(
1728
1828
string vhostName ,
1729
1829
string federationUpstreamName ,
1730
1830
CancellationToken cancellationToken = default
1731
- )
1732
- {
1733
- return client . GetParameterAsync ( vhostName , "federation-upstream" , federationUpstreamName , cancellationToken )
1734
- . GetAwaiter ( )
1735
- . GetResult ( ) ;
1831
+ )
1832
+ {
1833
+ return client . GetParameterAsync ( vhostName , "federation-upstream" , federationUpstreamName , cancellationToken )
1834
+ . GetAwaiter ( )
1835
+ . GetResult ( ) ;
1736
1836
}
1737
1837
}
0 commit comments