- add services for base, table and entry

pull/26/head
Simon Gockner 6 years ago
parent 1a3c221b4e
commit 1051b88539
  1. 4
      GBase.Api/GBase.Api.csproj
  2. 14
      GBase.Api/Services/IGBaseEntryService.cs
  3. 18
      GBase.Api/Services/IGBaseService.cs
  4. 14
      GBase.Api/Services/IGBaseTableService.cs
  5. 13
      GBase.Server/Services/GBaseEntryService.cs
  6. 21
      GBase.Server/Services/GBaseService.cs
  7. 13
      GBase.Server/Services/GBaseTableService.cs
  8. 14
      GBase.Server/Startup.cs

@ -4,4 +4,8 @@
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Primitives" Version="4.7.0" />
</ItemGroup>
</Project> </Project>

@ -0,0 +1,14 @@
// Author: Gockner, Simon
// Created: 2020-02-10
// Copyright(c) 2020 SimonG. All Rights Reserved.
using System.ServiceModel;
namespace GBase.Api.Services
{
[ServiceContract]
public interface IGBaseEntryService //TODO: Add OperationContracts for all operations this service has to do
{
}
}

@ -0,0 +1,18 @@
// Author: Gockner, Simon
// Created: 2020-02-10
// Copyright(c) 2020 SimonG. All Rights Reserved.
using System.ServiceModel;
namespace GBase.Api.Services
{
[ServiceContract]
public interface IGBaseService //TODO: Add OperationContracts for all operations this service has to do
{
[OperationContract]
bool AddTable();
[OperationContract]
bool RemoveTable();
}
}

@ -0,0 +1,14 @@
// Author: Gockner, Simon
// Created: 2020-02-10
// Copyright(c) 2020 SimonG. All Rights Reserved.
using System.ServiceModel;
namespace GBase.Api.Services
{
[ServiceContract]
public interface IGBaseTableService //TODO: Add OperationContracts for all operations this service has to do
{
}
}

@ -0,0 +1,13 @@
// Author: Gockner, Simon
// Created: 2020-02-10
// Copyright(c) 2020 SimonG. All Rights Reserved.
using GBase.Api.Services;
namespace GBase.Server.Services
{
public class GBaseEntryService : IGBaseEntryService
{
}
}

@ -0,0 +1,21 @@
// Author: Gockner, Simon
// Created: 2020-02-10
// Copyright(c) 2020 SimonG. All Rights Reserved.
using GBase.Api.Services;
namespace GBase.Server.Services
{
public class GBaseService : IGBaseService
{
public bool AddTable()
{
throw new System.NotImplementedException();
}
public bool RemoveTable()
{
throw new System.NotImplementedException();
}
}
}

@ -0,0 +1,13 @@
// Author: Gockner, Simon
// Created: 2020-02-10
// Copyright(c) 2020 SimonG. All Rights Reserved.
using GBase.Api.Services;
namespace GBase.Server.Services
{
public class GBaseTableService : IGBaseTableService
{
}
}

@ -4,7 +4,8 @@
using CoreWCF; using CoreWCF;
using CoreWCF.Configuration; using CoreWCF.Configuration;
using GBase.Server.Interfaces; using GBase.Api.Services;
using GBase.Server.Services;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
@ -30,9 +31,14 @@ namespace GBase.Server
{ {
app.UseServiceModel(builder => app.UseServiceModel(builder =>
{ {
//TODO: Add needed service once it is implemented builder.AddService<GBaseService>();
//builder.AddService<>(); builder.AddServiceEndpoint<GBaseService, IGBaseService>(new BasicHttpBinding(), _configuration[GBaseServerSettings.GBASE_ENDPOINT_STARTUP_CONFIGURATION_PREFIX]);
//builder.AddServiceEndpoint<>(new BasicHttpBinding(), _configuration[GBaseServerSettings.ENDPOINT_STARTUP_CONFIGURATION_PREFIX]);
builder.AddService<GBaseTableService>();
builder.AddServiceEndpoint<GBaseTableService, IGBaseTableService>(new BasicHttpBinding(), _configuration[GBaseServerSettings.GBASE_TABLE_ENDPOINT_STARTUP_CONFIGURATION_PREFIX]);
builder.AddService<GBaseEntryService>();
builder.AddServiceEndpoint<GBaseEntryService, IGBaseEntryService>(new BasicHttpBinding(), _configuration[GBaseServerSettings.GBASE_ENTRY_ENDPOINT_STARTUP_CONFIGURATION_PREFIX]);
}); });
} }
} }

Loading…
Cancel
Save