/// <summary> /// Actually create the new object and append it to either the pipeline or the given IList. /// </summary> protected override void EndProcessing() { var newData = new Firewall.AllowedData { IPProtocol = IPProtocol, Ports = Port }; WriteObject(newData); base.EndProcessing(); }
private IList <Firewall.AllowedData> EnablePort(FirewallPort port) { var allowedData = new Firewall.AllowedData { IPProtocol = port.ProtocolString, Ports = new List <string> { port.Port.ToString() }, }; return(new List <Firewall.AllowedData> { allowedData }); }
/// <summary> /// Actually create the new object and append it to either the pipeline or the given IList. /// </summary> protected override void EndProcessing() { if (Port != null) { Port = Port.Select(portString => portString.Replace("..", "-")).ToList(); } var newData = new Firewall.AllowedData { IPProtocol = IPProtocol, Ports = Port }; WriteObject(newData); base.EndProcessing(); }