Skip to content

Commit 8b56714

Browse files
author
Ed Munoz
committed
Simplify logic for GetDeploymentByName when passed as a PersistentVMRoleContext
1 parent 6df244a commit 8b56714

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/ServiceManagement/Network/Commands.Network/NetworkClient.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -933,13 +933,12 @@ public string GetDeploymentBySlot(string serviceName, string slot)
933933
slotType).Name;
934934
}
935935

936-
public string GetDeploymentName(IPersistentVM vm, string slot, string serviceName)
936+
public string GetDeploymentName(PersistentVMRoleContext vm, string slot, string serviceName)
937937
{
938938
string deploymentName = null;
939-
var vmRoleContext = vm as PersistentVMRoleContext;
940-
if (vmRoleContext != null)
939+
if (vm != null)
941940
{
942-
deploymentName = vmRoleContext.DeploymentName;
941+
deploymentName = vm.DeploymentName;
943942
}
944943

945944
if (string.IsNullOrEmpty(slot) && string.IsNullOrEmpty(deploymentName))

0 commit comments

Comments
 (0)