// Author: Gockner, Simon // Created: 2020-02-10 // Copyright(c) 2020 SimonG. All Rights Reserved. using System.Net; using GBase.Api.Communication; using GBase.Client.Interfaces; namespace GBase.Client { public class GBaseClientSettings : IGBaseClientSettings { public GBaseClientSettings(ServerProtocol protocol, IPAddress ipAddress, int port, string gBaseEndpoint, string gBaseTableEndpoint, string gBaseEntryEndpoint) { Protocol = protocol; IpAddress = ipAddress; Port = port; GBaseEndpoint = gBaseEndpoint; GBaseTableEndpoint = gBaseTableEndpoint; GBaseEntryEndpoint = gBaseEntryEndpoint; } public ServerProtocol Protocol { get; } public IPAddress IpAddress { get; } public int Port { get; } public string GBaseEndpoint { get; } public string GBaseTableEndpoint { get; } public string GBaseEntryEndpoint { get; } public string ServerProtocolGBaseEndpointAddress => @$"{Protocol.GetProtocolString()}{IpAddress}:{Port}{GBaseEndpoint}"; public string ServerProtocolGBaseTableEndpointAddress => @$"{Protocol.GetProtocolString()}{IpAddress}:{Port}{GBaseTableEndpoint}"; public string ServerProtocolGBaseEntryEndpointAddress => @$"{Protocol.GetProtocolString()}{IpAddress}:{Port}{GBaseEntryEndpoint}"; } }