Beispiel #1
0
        /// <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();
        }
Beispiel #2
0
        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
            });
        }
Beispiel #3
0
        /// <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();
        }