Skip to content

Commit 52b12b7

Browse files
committed
Remove redundant null validation from new commandlets
1 parent 1d8b280 commit 52b12b7

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/GetAzureRmVirtualNetworkGatewayConnectionVpnDeviceConfigScript.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,6 @@ public override void Execute()
6565
{
6666
base.Execute();
6767

68-
if (string.IsNullOrWhiteSpace(this.DeviceVendor))
69-
{
70-
throw new ArgumentException("Required parameter DeviceVendor cannot be null or empty.");
71-
}
72-
73-
if (string.IsNullOrWhiteSpace(this.DeviceFamily))
74-
{
75-
throw new ArgumentException("Required parameter DeviceFamily cannot be null or empty.");
76-
}
77-
78-
if (string.IsNullOrWhiteSpace(this.FirmwareVersion))
79-
{
80-
throw new ArgumentException("Required parameter FirmwareVersion cannot be null or empty.");
81-
}
82-
8368
MNM.VpnDeviceScriptParameters vpnDeviceScriptParameter = new MNM.VpnDeviceScriptParameters()
8469
{
8570
DeviceFamily = this.DeviceFamily,

src/ResourceManager/Network/Commands.Network/VirtualNetworkGatewayConnection/GetAzureRmVirtualNetworkGatewaySupportedVpnDevice.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,10 @@ public class GetAzureRmVirtualNetworkGatewaySupportedVpnDevice : VirtualNetworkG
3838
public override void Execute()
3939
{
4040
base.Execute();
41-
if (!string.IsNullOrEmpty(this.Name) && !string.IsNullOrEmpty(this.ResourceGroupName))
42-
{
43-
var supportedVpnDevices = NetworkClient.NetworkManagementClient.VirtualNetworkGateways
44-
.SupportedVpnDevices(this.ResourceGroupName, this.Name);
41+
var supportedVpnDevices = NetworkClient.NetworkManagementClient.VirtualNetworkGateways
42+
.SupportedVpnDevices(this.ResourceGroupName, this.Name);
4543

46-
WriteObject(supportedVpnDevices);
47-
}
44+
WriteObject(supportedVpnDevices);
4845
}
4946
}
5047
}

0 commit comments

Comments
 (0)