diff --git a/Source/EasyNetQ.Management.Client.ApprovalTests/EasyNetQ.Management.Client.approved.txt b/Source/EasyNetQ.Management.Client.ApprovalTests/EasyNetQ.Management.Client.approved.txt index 090bf3f5..45a23f57 100644 --- a/Source/EasyNetQ.Management.Client.ApprovalTests/EasyNetQ.Management.Client.approved.txt +++ b/Source/EasyNetQ.Management.Client.ApprovalTests/EasyNetQ.Management.Client.approved.txt @@ -270,7 +270,13 @@ namespace EasyNetQ.Management.Client public static System.Threading.Tasks.Task GetParameterAsync(this EasyNetQ.Management.Client.IManagementClient client, EasyNetQ.Management.Client.Model.Vhost vhost, string componentName, string parameterName, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.Task GetParameterAsync(this EasyNetQ.Management.Client.IManagementClient client, string vhostName, string componentName, string parameterName, System.Threading.CancellationToken cancellationToken = default) { } public static System.Collections.Generic.IReadOnlyList GetParameters(this EasyNetQ.Management.Client.IManagementClient client, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IReadOnlyList GetParameters(this EasyNetQ.Management.Client.IManagementClient client, string componentName, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IReadOnlyList GetParameters(this EasyNetQ.Management.Client.IManagementClient client, string componentName, EasyNetQ.Management.Client.Model.Vhost vhost, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Collections.Generic.IReadOnlyList GetParameters(this EasyNetQ.Management.Client.IManagementClient client, string componentName, string vhostName, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.Task> GetParametersAsync(this EasyNetQ.Management.Client.IManagementClient client, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.Task> GetParametersAsync(this EasyNetQ.Management.Client.IManagementClient client, string componentName, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.Task> GetParametersAsync(this EasyNetQ.Management.Client.IManagementClient client, string componentName, EasyNetQ.Management.Client.Model.Vhost vhost, System.Threading.CancellationToken cancellationToken = default) { } + public static System.Threading.Tasks.Task> GetParametersAsync(this EasyNetQ.Management.Client.IManagementClient client, string componentName, string vhostName, System.Threading.CancellationToken cancellationToken = default) { } public static System.Collections.Generic.IReadOnlyList GetPermissions(this EasyNetQ.Management.Client.IManagementClient client, System.Threading.CancellationToken cancellationToken = default) { } public static System.Threading.Tasks.Task> GetPermissionsAsync(this EasyNetQ.Management.Client.IManagementClient client, System.Threading.CancellationToken cancellationToken = default) { } public static System.Collections.Generic.IReadOnlyList GetPolicies(this EasyNetQ.Management.Client.IManagementClient client, System.Threading.CancellationToken cancellationToken = default) { } diff --git a/Source/EasyNetQ.Management.Client/IManagementClient.cs b/Source/EasyNetQ.Management.Client/IManagementClient.cs index e50fdc05..00b07667 100755 --- a/Source/EasyNetQ.Management.Client/IManagementClient.cs +++ b/Source/EasyNetQ.Management.Client/IManagementClient.cs @@ -960,6 +960,32 @@ public static Task> GetParametersAsync( CancellationToken cancellationToken = default ) => client.GetAsync>(Parameters, cancellationToken); + /// + /// Get all parameters for a given component on the cluster + /// + /// + /// + /// + public static Task> GetParametersAsync( + this IManagementClient client, + string componentName, + CancellationToken cancellationToken = default + ) => client.GetAsync>(Parameters / componentName, cancellationToken); + + /// + /// Get all parameters for a given component and virtual host on the cluster + /// + /// + /// + /// + /// + public static Task> GetParametersAsync( + this IManagementClient client, + string componentName, + string vhostName, + CancellationToken cancellationToken = default + ) => client.GetAsync>(Parameters / componentName / vhostName, cancellationToken); + /// /// Creates a parameter on the cluster ///