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.1 KiB
34 lines
1.1 KiB
// Author: Gockner, Simon
|
|
// Created: 2020-02-10
|
|
// Copyright(c) 2020 SimonG. All Rights Reserved.
|
|
|
|
using System.Threading.Tasks;
|
|
using GBase.Api.Services;
|
|
using GBase.Client.Interfaces;
|
|
using GBase.Client.Services;
|
|
|
|
namespace GBase.Client
|
|
{
|
|
public class GBaseClient : IGBaseClient //TODO: Add logging?
|
|
{
|
|
public GBaseClient(IGBaseClientSettings settings)
|
|
{
|
|
GBase = new GBaseService(settings.Protocol, settings.ServerProtocolGBaseEndpointAddress);
|
|
GBaseTable = new GBaseTableService(settings.Protocol, settings.ServerProtocolGBaseTableEndpointAddress);
|
|
GBaseEntry = new GBaseEntryService(settings.Protocol, settings.ServerProtocolGBaseEntryEndpointAddress);
|
|
}
|
|
|
|
|
|
public IGBaseService GBase { get; }
|
|
public IGBaseTableService GBaseTable { get; }
|
|
public IGBaseEntryService GBaseEntry { get; }
|
|
|
|
|
|
public async ValueTask DisposeAsync()
|
|
{
|
|
await GBase.DisposeAsync();
|
|
await GBaseTable.DisposeAsync();
|
|
await GBaseEntry.DisposeAsync();
|
|
}
|
|
}
|
|
} |