public void AddPortMappings(List <PortMapping> portMappings) { foreach (var port in portMappings) { PortMappings.Add(port); } }
public void AddPortMappings(List <PortMapping> portMappings) { ArgUtil.NotNull(portMappings, nameof(portMappings)); foreach (var port in portMappings) { PortMappings.Add(port); } }
private void AddPortMappings(IList <string> arguments) { arguments.AddConditionally( PortMappings.Any(), $"{string.Join(" ", PortMappings.Select(pair => $"--publish {pair.Key}:{pair.Value}"))}"); }