A database based on .net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.4 KiB

// 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}";
}
}