//Constructor with parameters applicable to all ParameterSets private SetAzureServiceDomainJoinExtensionCmdletInfo(DomainJoinExtensionParameterSetType type, string value, string[] role, string slot, string serviceName, string thumbprintAlgorithm, bool restart, PSCredential credential) { this.cmdletName = Utilities.SetAzureServiceDomainJoinExtension; this.cmdletParams.Add(new CmdletParam(type.ToString(), value)); if (role != null) { this.cmdletParams.Add(new CmdletParam("Role", role)); } if (!string.IsNullOrEmpty(slot)) { this.cmdletParams.Add(new CmdletParam("Slot", slot)); } if (!string.IsNullOrEmpty(serviceName)) { this.cmdletParams.Add(new CmdletParam("ServiceName", serviceName)); } if (!string.IsNullOrEmpty(thumbprintAlgorithm)) { this.cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", thumbprintAlgorithm)); } if (restart) { this.cmdletParams.Add(new CmdletParam("Restart")); } if (credential != null) { this.cmdletParams.Add(new CmdletParam("Credential", credential)); } }
//Constructor with parameters applicable to all ParameterSets private SetAzureServiceDomainJoinExtensionCmdletInfo(DomainJoinExtensionParameterSetType type, string value, string[] role, string slot, string serviceName, string thumbprintAlgorithm, bool restart, PSCredential credential) { this.cmdletName = Utilities.SetAzureServiceDomainJoinExtension; this.cmdletParams.Add(new CmdletParam(type.ToString(), value)); if (role != null) { this.cmdletParams.Add(new CmdletParam("Role", role)); } if (!string.IsNullOrEmpty(slot)) { this.cmdletParams.Add(new CmdletParam("Slot", slot)); } if (!string.IsNullOrEmpty(serviceName)) { this.cmdletParams.Add(new CmdletParam("ServiceName",serviceName)); } if (!string.IsNullOrEmpty(thumbprintAlgorithm)) { this.cmdletParams.Add(new CmdletParam("ThumbprintAlgorithm", thumbprintAlgorithm)); } if (restart) { this.cmdletParams.Add(new CmdletParam("Restart")); } if (credential != null) { this.cmdletParams.Add(new CmdletParam("Credential", credential)); } }