/// <summary> /// This function is responsible for validating the parameters. /// </summary> protected override void BeginODLVSEMCmdlet() { if (this.Connection == null || this.VMNetwork == null) { ODLVSEMETW.EventWriteValidateCmdletParameter(this.CmdletName, "Mandatory parameter(s) not provided."); throw new NSPluginArgumentException("Mandatory parameter(s) not provided."); } this.conn = VSEMODLCmdletUtility.ValidateConnectionObject(this.Connection, this.CmdletName); }
/// <summary> /// This function is responsible for validating the parameters. /// </summary> protected override void BeginODLVSEMCmdlet() { if (this.Connection == null || this.VMSubnetId == null || this.VMSubnetId == Guid.Empty || string.IsNullOrWhiteSpace(this.Name) || string.IsNullOrWhiteSpace(this.IPAddressSubnet) || string.IsNullOrWhiteSpace(this.AddressRangeStart) || string.IsNullOrWhiteSpace(this.AddressRangeEnd)) { ODLVSEMETW.EventWriteValidateCmdletParameter(this.CmdletName, "Mandatory parameter(s) not provided."); throw new NSPluginArgumentException("Mandatory parameter(s) not provided."); } this.conn = VSEMODLCmdletUtility.ValidateConnectionObject(this.Connection, this.CmdletName); }
/// <summary> /// This function is responsible for validating the parameters. /// </summary> protected override void BeginODLVSEMCmdlet() { if (this.Connection == null || string.IsNullOrWhiteSpace(this.VMSubnetName) || this.IPSubnets == null || this.LogicalNetworkDefinitionId == null || this.LogicalNetworkDefinitionId == Guid.Empty || string.IsNullOrWhiteSpace(this.VMNetworkName)) { ODLVSEMETW.EventWriteValidateCmdletParameter(this.CmdletName, "Mandatory parameter(s) not provided."); throw new NSPluginArgumentException("Mandatory parameter(s) not provided."); } this.conn = VSEMODLCmdletUtility.ValidateConnectionObject(this.Connection, this.CmdletName); if (this.IPSubnets.Any(subnet => string.IsNullOrEmpty(subnet.Subnet) || subnet.AddressFamily == null)) { ODLVSEMETW.EventWriteValidateCmdletParameter(this.CmdletName, "IPSubnets is invalid. Please provide AddressFamily and Subnet in IPSubnets."); throw new NSPluginArgumentException("IPSubnets is invalid. Please provide AddressFamily and Subnet in IPSubnets."); } }
/// <summary> /// This function is responsible for validating the parameters. /// </summary> protected override void BeginODLVSEMCmdlet() { this.conn = VSEMODLCmdletUtility.ValidateConnectionObject(this.Connection, this.CmdletName); }