コード例 #1
0
        /// <summary>
        /// Method to delete a forwarding entry
        /// </summary>
        /// <param name="entry">the entry to delete</param>
        /// <returns></returns>
        public async Task DeleteForwardingEntryAsync(Layer3ForwardingEntry entry)
        {
            List <SOAP.SoapRequestParameter> parameters = new List <SOAP.SoapRequestParameter>()
            {
                new SOAP.SoapRequestParameter("NewDestIPAddress", entry.DestinationIPAddress.ToString()),
                new SOAP.SoapRequestParameter("NewDestSubnetMask", entry.DestinationSubnetMask.ToString()),
                new SOAP.SoapRequestParameter("NewSourceIPAddress", entry.SourceIPAddress.ToString()),
                new SOAP.SoapRequestParameter("NewSourceSubnetMask", entry.SourceSubnetMask.ToString())
            };

            await this.InvokeAsync("AddForwardingEntry", parameters.ToArray());
        }
コード例 #2
0
        /// <summary>
        /// Method to add a forwarding entry
        /// </summary>
        /// <param name="entry">the entry to add</param>
        /// <returns></returns>
        public async Task AddForwardingEntryAsync(Layer3ForwardingEntry entry)
        {
            List <SOAP.SoapRequestParameter> parameters = new List <SOAP.SoapRequestParameter>()
            {
                new SOAP.SoapRequestParameter("NewType", entry.Type),
                new SOAP.SoapRequestParameter("NewDestIPAddress", entry.DestinationIPAddress),
                new SOAP.SoapRequestParameter("NewDestSubnetMask", entry.DestinationSubnetMask),
                new SOAP.SoapRequestParameter("NewSourceIPAddress", entry.SourceIPAddress),
                new SOAP.SoapRequestParameter("NewSourceSubnetMask", entry.SourceSubnetMask),
                new SOAP.SoapRequestParameter("NewGatewayIPAddress", entry.GatewayIPAddress),
                new SOAP.SoapRequestParameter("NewInterface", entry.Interface),
                new SOAP.SoapRequestParameter("NewForwardingMetric", entry.ForwardingMetric)
            };

            await this.InvokeAsync("AddForwardingEntry", parameters.ToArray());
        }