From baf8ca05102444ff3c0082f18747fb77eef3a769 Mon Sep 17 00:00:00 2001 From: Nicola Carminati Date: Wed, 21 Aug 2019 16:03:37 +0200 Subject: [PATCH] Added ToString Method --- .../Models/GatewayConfiguration.cs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Step.CmsConnectGateway/Models/GatewayConfiguration.cs b/Step.CmsConnectGateway/Models/GatewayConfiguration.cs index f94a78de..089e3f59 100644 --- a/Step.CmsConnectGateway/Models/GatewayConfiguration.cs +++ b/Step.CmsConnectGateway/Models/GatewayConfiguration.cs @@ -20,6 +20,16 @@ namespace Step.CmsConnectGateway 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 @@ -31,5 +41,16 @@ namespace Step.CmsConnectGateway 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"); + } } }