using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Net; namespace Step.CmsConnectManager { public enum GatewayConnectionStatus { OK = 0, WEB_ERROR = 1, PORT_ERROR = 2 }; public class GatewayNetworkConfiguration { internal GatewayNetworkConfiguration() {} public bool hasDhcp { get; internal set;} public IPAddress ipAddress { get; internal set; } public IPAddress netMaskAddress { get; internal set; } public IPAddress defaultGatewayAddress { get; internal set; } public IEnumerable dnsAddresses { get; internal set; } public IEnumerable dnsPrefixes { get; internal set; } public override string ToString() { return "hasDhcp: " + hasDhcp + Environment.NewLine + "ipAddress: " + (ipAddress != null ? ipAddress.ToString() : "null") + Environment.NewLine + "netMaskAddress: " + (netMaskAddress != null ? netMaskAddress.ToString() : "null") + Environment.NewLine + "defaultGatewayAddress: " + (defaultGatewayAddress != null ? defaultGatewayAddress.ToString() : "null") + Environment.NewLine + "dnsAddresses: " + (dnsAddresses != null ? string.Join(",", dnsAddresses) : "null") + Environment.NewLine + "dnsPrefixes: " + (dnsPrefixes != null ? string.Join(",", dnsPrefixes) : "null"); } } public class GatewayProxyConfiguration { internal GatewayProxyConfiguration(){} public bool hasProxy { get; internal set; } public string address { get; internal set; } public uint port { get; internal set; } public string username { get; internal set; } public string password { get; internal set; } public IEnumerable noproxyAddresses { get; internal set; } public override string ToString() { return "hasProxy: " + hasProxy + Environment.NewLine + "address: " + (address != null ? address.ToString() : "null") + Environment.NewLine + "port: " + (port != 0 ? port.ToString() : "null") + Environment.NewLine + "username: " + (username != null ? username : "null") + Environment.NewLine + "password: " + (password != null ? password : "null") + Environment.NewLine + "noproxyAddresses: " + (noproxyAddresses != null ? string.Join(",", noproxyAddresses) : "null"); } } }