Exemple #1
0
 public static ResourceConfig <NetworkSecurityGroup> CreateNetworkSecurityGroupConfig(
     this ResourceConfig <ResourceGroup> resourceGroup,
     string name,
     int[] openPorts,
     Func <OperatingSystemTypes> getOsType)
 => resourceGroup.CreateNetworkSecurityGroupConfig(
     name,
     () => getOsType().UpdatePorts(openPorts));
Exemple #2
0
 public static ResourceConfig <NetworkSecurityGroup> CreateNetworkSecurityGroupConfig(
     this ResourceConfig <ResourceGroup> resourceGroup,
     string name,
     int[] openPorts,
     ImageAndOsType imageAndOsType)
 => resourceGroup.CreateNetworkSecurityGroupConfig(
     name,
     imageAndOsType.UpdatePorts(openPorts));
 public static ResourceConfig <NetworkSecurityGroup> CreateNetworkSecurityGroupConfig(
     this ResourceConfig <ResourceGroup> resourceGroup,
     string name,
     int[] openPorts,
     Func <OperatingSystemTypes> getOsType)
 => resourceGroup.CreateNetworkSecurityGroupConfig(
     name,
     () => openPorts ??
     (getOsType() == OperatingSystemTypes.Windows ? new[] { 3389, 5985 } : new[] { 22 }));