- make services disposable

- add services to client interface
pull/26/head
Simon Gockner 6 years ago
parent d88ca6be61
commit 3436edbe6b
  1. 3
      GBase.Api/Services/IGBaseEntryService.cs
  2. 3
      GBase.Api/Services/IGBaseService.cs
  3. 3
      GBase.Api/Services/IGBaseTableService.cs
  4. 7
      GBase.Client/GBaseClient.cs
  5. 5
      GBase.Client/Interfaces/IGBaseClient.cs
  6. 6
      GBase.Server/Services/GBaseEntryService.cs
  7. 6
      GBase.Server/Services/GBaseService.cs
  8. 6
      GBase.Server/Services/GBaseTableService.cs

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

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

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

@ -3,6 +3,7 @@
// Copyright(c) 2020 SimonG. All Rights Reserved. // Copyright(c) 2020 SimonG. All Rights Reserved.
using System.Threading.Tasks; using System.Threading.Tasks;
using GBase.Api.Services;
using GBase.Client.Interfaces; using GBase.Client.Interfaces;
using GBase.Client.Services; using GBase.Client.Services;
@ -18,9 +19,9 @@ namespace GBase.Client
} }
public GBaseService GBase { get; } public IGBaseService GBase { get; }
public GBaseTableService GBaseTable { get; } public IGBaseTableService GBaseTable { get; }
public GBaseEntryService GBaseEntry { get; } public IGBaseEntryService GBaseEntry { get; }
public async ValueTask DisposeAsync() public async ValueTask DisposeAsync()

@ -3,11 +3,14 @@
// Copyright(c) 2020 SimonG. All Rights Reserved. // Copyright(c) 2020 SimonG. All Rights Reserved.
using System; using System;
using GBase.Api.Services;
namespace GBase.Client.Interfaces namespace GBase.Client.Interfaces
{ {
public interface IGBaseClient : IAsyncDisposable public interface IGBaseClient : IAsyncDisposable
{ {
IGBaseService GBase { get; }
IGBaseTableService GBaseTable { get; }
IGBaseEntryService GBaseEntry { get; }
} }
} }

@ -2,12 +2,16 @@
// Created: 2020-02-10 // Created: 2020-02-10
// Copyright(c) 2020 SimonG. All Rights Reserved. // Copyright(c) 2020 SimonG. All Rights Reserved.
using System.Threading.Tasks;
using GBase.Api.Services; using GBase.Api.Services;
namespace GBase.Server.Services namespace GBase.Server.Services
{ {
public class GBaseEntryService : IGBaseEntryService public class GBaseEntryService : IGBaseEntryService
{ {
public async ValueTask DisposeAsync()
{
throw new System.NotImplementedException();
}
} }
} }

@ -2,6 +2,7 @@
// Created: 2020-02-10 // Created: 2020-02-10
// Copyright(c) 2020 SimonG. All Rights Reserved. // Copyright(c) 2020 SimonG. All Rights Reserved.
using System.Threading.Tasks;
using GBase.Api.Services; using GBase.Api.Services;
namespace GBase.Server.Services namespace GBase.Server.Services
@ -17,5 +18,10 @@ namespace GBase.Server.Services
{ {
throw new System.NotImplementedException(); throw new System.NotImplementedException();
} }
public async ValueTask DisposeAsync()
{
throw new System.NotImplementedException();
}
} }
} }

@ -2,12 +2,16 @@
// Created: 2020-02-10 // Created: 2020-02-10
// Copyright(c) 2020 SimonG. All Rights Reserved. // Copyright(c) 2020 SimonG. All Rights Reserved.
using System.Threading.Tasks;
using GBase.Api.Services; using GBase.Api.Services;
namespace GBase.Server.Services namespace GBase.Server.Services
{ {
public class GBaseTableService : IGBaseTableService public class GBaseTableService : IGBaseTableService
{ {
public async ValueTask DisposeAsync()
{
throw new System.NotImplementedException();
}
} }
} }
Loading…
Cancel
Save