Skip to content

Commit c87bd0b

Browse files
author
Samuel Anudeep
committed
Merge pull request #178 from MabOneSdk/anudeeb-dev1
Refactoring Help Message and Param Name classes
2 parents 2c067e2 + dc9f13d commit c87bd0b

File tree

6 files changed

+12
-15
lines changed

6 files changed

+12
-15
lines changed

src/ResourceManager/RecoveryServices.Backup/CmdletParameterHelpMessages.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,10 @@ internal static class ParamHelpMsg
2424
{
2525
internal static class Container
2626
{
27-
internal static class Get
28-
{
29-
public const string Name = "The name of the resource being managed by the Azure Backup service (for example: resource name of the VM).";
30-
public const string ResourceGroupName = "The ResourceGroup of the resource being managed by the Azure Backup service (for example: ResourceGroup name of the VM).";
31-
public const string Status = "The registration status of the Azure Backup container.";
32-
public const string ContainerType = "The type of the Azure Backup container. This can be a Windows Server, an Azure IaaS VM, or a Data Protection Manager server.";
33-
}
27+
public const string Name = "The name of the resource being managed by the Azure Backup service (for example: resource name of the VM).";
28+
public const string ResourceGroupName = "The ResourceGroup of the resource being managed by the Azure Backup service (for example: ResourceGroup name of the VM).";
29+
public const string Status = "The registration status of the Azure Backup container.";
30+
public const string ContainerType = "The type of the Azure Backup container. This can be a Windows Server, an Azure IaaS VM, or a Data Protection Manager server.";
3431
}
3532

3633
internal static class Common

src/ResourceManager/RecoveryServices.Backup/Cmdlets/Container/GetAzureRmRecoveryServicesContainer.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ public class GetAzureRmRecoveryServicesContainer : RecoveryServicesBackupCmdletB
3535
[ValidateNotNullOrEmpty]
3636
public ARSVault Vault { get; set; }
3737

38-
[Parameter(Mandatory = true, HelpMessage = ParamHelpMsg.Container.Get.ContainerType)]
38+
[Parameter(Mandatory = true, HelpMessage = ParamHelpMsg.Container.ContainerType)]
3939
[ValidateNotNullOrEmpty]
4040
public ContainerType ContainerType { get; set; }
4141

42-
[Parameter(Mandatory = false, HelpMessage = ParamHelpMsg.Container.Get.Name)]
42+
[Parameter(Mandatory = false, HelpMessage = ParamHelpMsg.Container.Name)]
4343
[ValidateNotNullOrEmpty]
4444
public string Name { get; set; }
4545

46-
[Parameter(Mandatory = false, HelpMessage = ParamHelpMsg.Container.Get.ResourceGroupName)]
46+
[Parameter(Mandatory = false, HelpMessage = ParamHelpMsg.Container.ResourceGroupName)]
4747
[ValidateNotNullOrEmpty]
4848
public string ResourceGroupName { get; set; }
4949

50-
[Parameter(Mandatory = true, HelpMessage = ParamHelpMsg.Container.Get.Status)]
50+
[Parameter(Mandatory = true, HelpMessage = ParamHelpMsg.Container.Status)]
5151
[ValidateNotNullOrEmpty]
5252
public ContainerRegistrationStatus Status { get; set; }
5353

src/ResourceManager/RecoveryServices.Backup/Cmdlets/ProtectionPolicy/GetAzureRmRecoveryServicesPolicy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public override void ExecuteCmdlet()
3939

4040
PsBackupProviderManager providerManager = new PsBackupProviderManager(new Dictionary<System.Enum, object>()
4141
{
42-
{GetContainerParams.Name, Name},
42+
{ContainerParams.Name, Name},
4343
}, HydraAdapter);
4444

4545
IPsBackupProvider psBackupProvider = providerManager.GetProviderInstance(ContainerType.AzureVM);

src/ResourceManager/RecoveryServices.Backup/Cmdlets/ProtectionPolicy/NewAzureRmRecoveryServicesPolicy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public override void ExecuteCmdlet()
5555

5656
PsBackupProviderManager providerManager = new PsBackupProviderManager(new Dictionary<System.Enum, object>()
5757
{
58-
{GetContainerParams.Name, Name},
58+
{ContainerParams.Name, Name},
5959
}, HydraAdapter);
6060

6161
IPsBackupProvider psBackupProvider = providerManager.GetProviderInstance(ContainerType.AzureVM);

src/ResourceManager/RecoveryServices.Backup/Cmdlets/ProtectionPolicy/SetAzureRmRecoveryServicesPolicy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public override void ExecuteCmdlet()
5555

5656
PsBackupProviderManager providerManager = new PsBackupProviderManager(new Dictionary<System.Enum, object>()
5757
{
58-
{GetContainerParams.Name, Name},
58+
{ContainerParams.Name, Name},
5959
}, HydraAdapter);
6060

6161
IPsBackupProvider psBackupProvider = providerManager.GetProviderInstance(ContainerType.AzureVM);

src/ResourceManager/RecoveryServices.Backup/Commands.RecoveryServices.Backup.Models/CmdletParamEnums.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
namespace Microsoft.Azure.Commands.RecoveryServices.Backup.Cmdlets.Models
2222
{
23-
public enum GetContainerParams
23+
public enum ContainerParams
2424
{
2525
Vault,
2626
ContainerType,

0 commit comments

Comments
 (0)