#21: refactor GBaseEntry name

pull/26/head
Simon Gockner 6 years ago
parent 24a3dc8e5f
commit b770b78481
  1. 2
      .vscode/launch.json
  2. 4
      GBase.Api/Communication/ICommunicationSettings.cs
  3. 33
      GBase.Api/GBase.Api.xml
  4. 4
      GBase.Api/Services/IGBaseColumnService.cs
  5. 8
      GBase.Api/Services/IGBaseTableService.cs
  6. 4
      GBase.Client/Factories/IGBaseClientSettingsFactory.cs
  7. 58
      GBase.Client/GBase.Client.xml
  8. 13
      GBase.Client/GBaseClient.cs
  9. 14
      GBase.Client/GBaseClientSettings.cs
  10. 4
      GBase.Client/Installers/GBaseClientInstaller.cs
  11. 4
      GBase.Client/Interfaces/IGBaseClient.cs
  12. 4
      GBase.Client/Interfaces/IGBaseClientSettings.cs
  13. 10
      GBase.Client/Services/Factories/IGBaseColumnServiceFactory.cs
  14. 10
      GBase.Client/Services/GBaseColumnService.cs
  15. 12
      GBase.Client/Services/GBaseTableService.cs
  16. 18
      GBase.Server/GBaseServerSettings.cs
  17. 2
      GBase.Server/Program.cs
  18. 2
      GBase.Server/Services/GBaseColumnService.cs
  19. 4
      GBase.Server/Services/GBaseTableService.cs
  20. 4
      GBase.Server/Startup.cs
  21. 6
      GBase/Attributes/GBaseColumnAttribute.cs
  22. 33
      GBase/Diagnosis/GBaseTableColumnAnalyzer.cs
  23. 10
      GBase/Factories/IGBaseColumnFactory.cs
  24. 155
      GBase/GBase.xml
  25. 8
      GBase/GBaseColumn.cs
  26. 48
      GBase/GBaseTable.cs
  27. 4
      GBase/Installers/GBaseInstaller.cs
  28. 4
      GBase/Interfaces/IGBaseColumn.cs
  29. 16
      GBase/Interfaces/IGBaseTable.cs
  30. 7
      Test.GBase.Client/IntegrationTest.cs
  31. 2
      Test.GBase/TestClasses/Foo.cs

@ -11,7 +11,7 @@
"preLaunchTask": "build", "preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path. // If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/GBase.Server/bin/Debug/netcoreapp3.1/GBase.Server.dll", "program": "${workspaceFolder}/GBase.Server/bin/Debug/netcoreapp3.1/GBase.Server.dll",
"args": ["-pr", "http", "-ip", "127.0.0.1", "-p", "8080", "-e", "/GBase", "-et", "/GBaseTable", "-ee", "/GBaseEntry"], "args": ["-pr", "http", "-ip", "127.0.0.1", "-p", "8080", "-e", "/GBase", "-et", "/GBaseTable", "-ee", "/GBaseColumn"],
"cwd": "${workspaceFolder}/GBase.Server", "cwd": "${workspaceFolder}/GBase.Server",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole", "console": "internalConsole",

@ -37,8 +37,8 @@ namespace GBase.Api.Communication
string GBaseTableEndpoint { get; } string GBaseTableEndpoint { get; }
/// <summary> /// <summary>
/// The used endpoint for the GBaseEntry /// The used endpoint for the GBaseColumn
/// </summary> /// </summary>
string GBaseEntryEndpoint { get; } string GBaseColumnEndpoint { get; }
} }
} }

@ -34,9 +34,9 @@
The used endpoint for the GBaseTable The used endpoint for the GBaseTable
</summary> </summary>
</member> </member>
<member name="P:GBase.Api.Communication.ICommunicationSettings.GBaseEntryEndpoint"> <member name="P:GBase.Api.Communication.ICommunicationSettings.GBaseColumnEndpoint">
<summary> <summary>
The used endpoint for the GBaseEntry The used endpoint for the GBaseColumn
</summary> </summary>
</member> </member>
<member name="T:GBase.Api.Communication.ServerProtocol"> <member name="T:GBase.Api.Communication.ServerProtocol">
@ -80,6 +80,11 @@
<returns>The <see cref="T:GBase.Api.Communication.ServerProtocol"/> for the given <see cref="T:System.String"/></returns> <returns>The <see cref="T:GBase.Api.Communication.ServerProtocol"/> for the given <see cref="T:System.String"/></returns>
<exception cref="T:System.ArgumentOutOfRangeException">Invalid string passed.</exception> <exception cref="T:System.ArgumentOutOfRangeException">Invalid string passed.</exception>
</member> </member>
<member name="T:GBase.Api.GBaseEntryChangedEventArgs">
<summary>
<see cref="T:System.EventArgs"/> for the <see cref="T:GBase.Api.INotifyGBaseEntryChanged"/> event
</summary>
</member>
<member name="T:GBase.Api.IGBaseObject"> <member name="T:GBase.Api.IGBaseObject">
<summary> <summary>
GBase object that allows conversion from <see cref="T:System.String"/> GBase object that allows conversion from <see cref="T:System.String"/>
@ -91,12 +96,22 @@
</summary> </summary>
<param name="string">The given <see cref="T:System.String"/></param> <param name="string">The given <see cref="T:System.String"/></param>
</member> </member>
<member name="T:GBase.Api.Services.IGBaseEntryService"> <member name="T:GBase.Api.INotifyGBaseEntryChanged">
<summary>
Notify the GBase that an entry has changed
</summary>
</member>
<member name="T:GBase.Api.NotifyGBaseEntryChanged">
<summary>
Notify the GBase that an entry has changed
</summary>
</member>
<member name="T:GBase.Api.Services.IGBaseColumnService">
<summary> <summary>
ServiceContract for the GBaseEntry ServiceContract for the GBaseColumn
</summary> </summary>
</member> </member>
<member name="M:GBase.Api.Services.IGBaseEntryService.Dummy"> <member name="M:GBase.Api.Services.IGBaseColumnService.Dummy">
<summary> <summary>
Dummy OperationContract Dummy OperationContract
</summary> </summary>
@ -123,15 +138,15 @@
ServiceContract for the GBaseTable ServiceContract for the GBaseTable
</summary> </summary>
</member> </member>
<member name="M:GBase.Api.Services.IGBaseTableService.AddEntry"> <member name="M:GBase.Api.Services.IGBaseTableService.AddColumn">
<summary> <summary>
Add an entry to the GBaseTable Add a column to the GBaseTable
</summary> </summary>
<returns>True if successful, false if not</returns> <returns>True if successful, false if not</returns>
</member> </member>
<member name="M:GBase.Api.Services.IGBaseTableService.RemoveEntry"> <member name="M:GBase.Api.Services.IGBaseTableService.RemoveColumn">
<summary> <summary>
Remove an entry from the GBaseTable Remove a column from the GBaseTable
</summary> </summary>
<returns>True if successful, false if not</returns> <returns>True if successful, false if not</returns>
</member> </member>

@ -8,10 +8,10 @@ using System.ServiceModel;
namespace GBase.Api.Services namespace GBase.Api.Services
{ {
/// <summary> /// <summary>
/// ServiceContract for the GBaseEntry /// ServiceContract for the GBaseColumn
/// </summary> /// </summary>
[ServiceContract] [ServiceContract]
public interface IGBaseEntryService : IAsyncDisposable //TODO: Add OperationContracts for all operations this service has to do public interface IGBaseColumnService : IAsyncDisposable //TODO: Add OperationContracts for all operations this service has to do
{ {
/// <summary> /// <summary>
/// Dummy OperationContract /// Dummy OperationContract

@ -14,17 +14,17 @@ namespace GBase.Api.Services
public interface IGBaseTableService : IAsyncDisposable //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
{ {
/// <summary> /// <summary>
/// Add an entry to the GBaseTable /// Add a column to the GBaseTable
/// </summary> /// </summary>
/// <returns>True if successful, false if not</returns> /// <returns>True if successful, false if not</returns>
[OperationContract] [OperationContract]
bool AddEntry(); bool AddColumn();
/// <summary> /// <summary>
/// Remove an entry from the GBaseTable /// Remove a column from the GBaseTable
/// </summary> /// </summary>
/// <returns>True if successful, false if not</returns> /// <returns>True if successful, false if not</returns>
[OperationContract] [OperationContract]
bool RemoveEntry(); bool RemoveColumn();
} }
} }

@ -22,8 +22,8 @@ namespace GBase.Client.Factories
/// <param name="port">The port</param> /// <param name="port">The port</param>
/// <param name="gBaseEndpoint">The GBase endpoint</param> /// <param name="gBaseEndpoint">The GBase endpoint</param>
/// <param name="gBaseTableEndpoint">The GBaseTable endpoint</param> /// <param name="gBaseTableEndpoint">The GBaseTable endpoint</param>
/// <param name="gBaseEntryEndpoint">The GBaseEntry endpoint</param> /// <param name="gBaseColumnEndpoint">The GBaseColumn endpoint</param>
/// <returns>A newly created instance of the implementation for <see cref="IGBaseClientSettings"/></returns> /// <returns>A newly created instance of the implementation for <see cref="IGBaseClientSettings"/></returns>
IGBaseClientSettings Create(ServerProtocol protocol, IPAddress ipAddress, int port, string gBaseEndpoint, string gBaseTableEndpoint, string gBaseEntryEndpoint); IGBaseClientSettings Create(ServerProtocol protocol, IPAddress ipAddress, int port, string gBaseEndpoint, string gBaseTableEndpoint, string gBaseColumnEndpoint);
} }
} }

@ -30,7 +30,7 @@
<param name="port">The port</param> <param name="port">The port</param>
<param name="gBaseEndpoint">The GBase endpoint</param> <param name="gBaseEndpoint">The GBase endpoint</param>
<param name="gBaseTableEndpoint">The GBaseTable endpoint</param> <param name="gBaseTableEndpoint">The GBaseTable endpoint</param>
<param name="gBaseEntryEndpoint">The GBaseEntry endpoint</param> <param name="gBaseColumnEndpoint">The GBaseEntry endpoint</param>
<returns>A newly created instance of the implementation for <see cref="T:GBase.Client.Interfaces.IGBaseClientSettings"/></returns> <returns>A newly created instance of the implementation for <see cref="T:GBase.Client.Interfaces.IGBaseClientSettings"/></returns>
</member> </member>
<member name="T:GBase.Client.GBaseClient"> <member name="T:GBase.Client.GBaseClient">
@ -38,14 +38,14 @@
A client for the GBase A client for the GBase
</summary> </summary>
</member> </member>
<member name="M:GBase.Client.GBaseClient.#ctor(GBase.Client.Interfaces.IGBaseClientSettings,GBase.Client.Services.Factories.IGBaseServiceFactory,GBase.Client.Services.Factories.IGBaseTableServiceFactory,GBase.Client.Services.Factories.IGBaseEntryServiceFactory)"> <member name="M:GBase.Client.GBaseClient.#ctor(GBase.Client.Interfaces.IGBaseClientSettings,GBase.Client.Services.Factories.IGBaseServiceFactory,GBase.Client.Services.Factories.IGBaseTableServiceFactory,GBase.Client.Services.Factories.IGBaseColumnServiceFactory)">
<summary> <summary>
A client for the GBase A client for the GBase
</summary> </summary>
<param name="settings">The <see cref="T:GBase.Client.Interfaces.IGBaseClientSettings"/> for this client</param> <param name="settings">The <see cref="T:GBase.Client.Interfaces.IGBaseClientSettings"/> for this client</param>
<param name="gBaseServiceFactory">The <see cref="T:GBase.Client.Services.Factories.IGBaseServiceFactory"/></param> <param name="gBaseServiceFactory">The <see cref="T:GBase.Client.Services.Factories.IGBaseServiceFactory"/></param>
<param name="gBaseTableServiceFactory">The <see cref="T:GBase.Client.Services.Factories.IGBaseTableServiceFactory"/></param> <param name="gBaseTableServiceFactory">The <see cref="T:GBase.Client.Services.Factories.IGBaseTableServiceFactory"/></param>
<param name="gBaseEntryServiceFactory">The <see cref="T:GBase.Client.Services.Factories.IGBaseEntryServiceFactory"/></param> <param name="gBaseColumnServiceFactory">The <see cref="T:GBase.Client.Services.Factories.IGBaseColumnServiceFactory"/></param>
</member> </member>
<member name="P:GBase.Client.GBaseClient.GBase"> <member name="P:GBase.Client.GBaseClient.GBase">
<summary> <summary>
@ -57,9 +57,9 @@
Functions of the GBaseTable Functions of the GBaseTable
</summary> </summary>
</member> </member>
<member name="P:GBase.Client.GBaseClient.GBaseEntry"> <member name="P:GBase.Client.GBaseClient.GBaseColumn">
<summary> <summary>
Functions of the GBaseEntry Functions of the GBaseColumn
</summary> </summary>
</member> </member>
<member name="M:GBase.Client.GBaseClient.DisposeAsync"> <member name="M:GBase.Client.GBaseClient.DisposeAsync">
@ -82,7 +82,7 @@
<param name="port">The port</param> <param name="port">The port</param>
<param name="gBaseEndpoint">The GBase endpoint</param> <param name="gBaseEndpoint">The GBase endpoint</param>
<param name="gBaseTableEndpoint">The GBaseTable endpoint</param> <param name="gBaseTableEndpoint">The GBaseTable endpoint</param>
<param name="gBaseEntryEndpoint">The GBaseEntry endpoint</param> <param name="gBaseColumnEndpoint">The GBaseColumn endpoint</param>
</member> </member>
<member name="P:GBase.Client.GBaseClientSettings.Protocol"> <member name="P:GBase.Client.GBaseClientSettings.Protocol">
<summary> <summary>
@ -109,9 +109,9 @@
GBaseTable endpoint the server listens to GBaseTable endpoint the server listens to
</summary> </summary>
</member> </member>
<member name="P:GBase.Client.GBaseClientSettings.GBaseEntryEndpoint"> <member name="P:GBase.Client.GBaseClientSettings.GBaseColumnEndpoint">
<summary> <summary>
GBaseEntry endpoint the server listens to GBaseColumn endpoint the server listens to
</summary> </summary>
</member> </member>
<member name="P:GBase.Client.GBaseClientSettings.ServerProtocolGBaseEndpointAddress"> <member name="P:GBase.Client.GBaseClientSettings.ServerProtocolGBaseEndpointAddress">
@ -124,9 +124,9 @@
Complete GBaseTable endpoint address based on the <see cref="T:GBase.Api.Communication.ICommunicationSettings"/> Complete GBaseTable endpoint address based on the <see cref="T:GBase.Api.Communication.ICommunicationSettings"/>
</summary> </summary>
</member> </member>
<member name="P:GBase.Client.GBaseClientSettings.ServerProtocolGBaseEntryEndpointAddress"> <member name="P:GBase.Client.GBaseClientSettings.ServerProtocolGBaseColumnEndpointAddress">
<summary> <summary>
Complete GBaseEntry endpoint address based on the <see cref="T:GBase.Api.Communication.ICommunicationSettings"/> Complete GBaseColumn endpoint address based on the <see cref="T:GBase.Api.Communication.ICommunicationSettings"/>
</summary> </summary>
</member> </member>
<member name="T:GBase.Client.Installers.GBaseClientInstaller"> <member name="T:GBase.Client.Installers.GBaseClientInstaller">
@ -152,9 +152,9 @@
Functions of the GBaseTable Functions of the GBaseTable
</summary> </summary>
</member> </member>
<member name="P:GBase.Client.Interfaces.IGBaseClient.GBaseEntry"> <member name="P:GBase.Client.Interfaces.IGBaseClient.GBaseColumn">
<summary> <summary>
Functions of the GBaseEntry Functions of the GBaseColumn
</summary> </summary>
</member> </member>
<member name="T:GBase.Client.Interfaces.IGBaseClientSettings"> <member name="T:GBase.Client.Interfaces.IGBaseClientSettings">
@ -172,23 +172,23 @@
Complete GBaseTable endpoint address based on the <see cref="T:GBase.Api.Communication.ICommunicationSettings"/> Complete GBaseTable endpoint address based on the <see cref="T:GBase.Api.Communication.ICommunicationSettings"/>
</summary> </summary>
</member> </member>
<member name="P:GBase.Client.Interfaces.IGBaseClientSettings.ServerProtocolGBaseEntryEndpointAddress"> <member name="P:GBase.Client.Interfaces.IGBaseClientSettings.ServerProtocolGBaseColumnEndpointAddress">
<summary> <summary>
Complete GBaseEntry endpoint address based on the <see cref="T:GBase.Api.Communication.ICommunicationSettings"/> Complete GBaseColumn endpoint address based on the <see cref="T:GBase.Api.Communication.ICommunicationSettings"/>
</summary> </summary>
</member> </member>
<member name="T:GBase.Client.Services.Factories.IGBaseEntryServiceFactory"> <member name="T:GBase.Client.Services.Factories.IGBaseColumnServiceFactory">
<summary> <summary>
Factory for the <see cref="T:GBase.Api.Services.IGBaseEntryService"/> Factory for the <see cref="T:GBase.Api.Services.IGBaseColumnService"/>
</summary> </summary>
</member> </member>
<member name="M:GBase.Client.Services.Factories.IGBaseEntryServiceFactory.Create(GBase.Api.Communication.ServerProtocol,System.String)"> <member name="M:GBase.Client.Services.Factories.IGBaseColumnServiceFactory.Create(GBase.Api.Communication.ServerProtocol,System.String)">
<summary> <summary>
Creates an <see cref="T:GBase.Api.Services.IGBaseEntryService"/> Creates an <see cref="T:GBase.Api.Services.IGBaseColumnService"/>
</summary> </summary>
<param name="serverProtocol">The <see cref="T:GBase.Api.Communication.ServerProtocol"/></param> <param name="serverProtocol">The <see cref="T:GBase.Api.Communication.ServerProtocol"/></param>
<param name="endpoint">The endpoint for the GBase</param> <param name="endpoint">The endpoint for the GBase</param>
<returns>A newly created instance of the implementation for <see cref="T:GBase.Api.Services.IGBaseEntryService"/></returns> <returns>A newly created instance of the implementation for <see cref="T:GBase.Api.Services.IGBaseColumnService"/></returns>
</member> </member>
<member name="T:GBase.Client.Services.Factories.IGBaseServiceFactory"> <member name="T:GBase.Client.Services.Factories.IGBaseServiceFactory">
<summary> <summary>
@ -216,19 +216,19 @@
<param name="endpoint">The endpoint for the GBase</param> <param name="endpoint">The endpoint for the GBase</param>
<returns>A newly created instance of the implementation for <see cref="T:GBase.Api.Services.IGBaseTableService"/></returns> <returns>A newly created instance of the implementation for <see cref="T:GBase.Api.Services.IGBaseTableService"/></returns>
</member> </member>
<member name="T:GBase.Client.Services.GBaseEntryService"> <member name="T:GBase.Client.Services.GBaseColumnService">
<summary> <summary>
<see cref="T:GBase.Client.Services.Service`1"/> for the IGBaseEntry <see cref="T:GBase.Client.Services.Service`1"/> for the IGBaseColumn
</summary> </summary>
</member> </member>
<member name="M:GBase.Client.Services.GBaseEntryService.#ctor(GBase.Api.Communication.ServerProtocol,System.String)"> <member name="M:GBase.Client.Services.GBaseColumnService.#ctor(GBase.Api.Communication.ServerProtocol,System.String)">
<summary> <summary>
<see cref="T:GBase.Client.Services.Service`1"/> for the IGBaseEntry <see cref="T:GBase.Client.Services.Service`1"/> for the IGBaseColumn
</summary> </summary>
<param name="serverProtocol">The <see cref="T:GBase.Api.Communication.ServerProtocol"/></param> <param name="serverProtocol">The <see cref="T:GBase.Api.Communication.ServerProtocol"/></param>
<param name="endpoint">The endpoint for the GBaseEntry</param> <param name="endpoint">The endpoint for the GBaseColumn</param>
</member> </member>
<member name="M:GBase.Client.Services.GBaseEntryService.Dummy"> <member name="M:GBase.Client.Services.GBaseColumnService.Dummy">
<summary> <summary>
Dummy method Dummy method
</summary> </summary>
@ -269,15 +269,15 @@
<param name="serverProtocol">The <see cref="T:GBase.Api.Communication.ServerProtocol"/></param> <param name="serverProtocol">The <see cref="T:GBase.Api.Communication.ServerProtocol"/></param>
<param name="endpoint">The endpoint for the GBaseTable</param> <param name="endpoint">The endpoint for the GBaseTable</param>
</member> </member>
<member name="M:GBase.Client.Services.GBaseTableService.AddEntry"> <member name="M:GBase.Client.Services.GBaseTableService.AddColumn">
<summary> <summary>
Add an entry to the GBaseTable Add a column to the GBaseTable
</summary> </summary>
<returns>True if successful, false if not</returns> <returns>True if successful, false if not</returns>
</member> </member>
<member name="M:GBase.Client.Services.GBaseTableService.RemoveEntry"> <member name="M:GBase.Client.Services.GBaseTableService.RemoveColumn">
<summary> <summary>
Remove an entry from the GBaseTable Remove a column from the GBaseTable
</summary> </summary>
<returns>True if successful, false if not</returns> <returns>True if successful, false if not</returns>
</member> </member>

@ -4,7 +4,6 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using GBase.Api.Services; using GBase.Api.Services;
using GBase.Client.Factories;
using GBase.Client.Interfaces; using GBase.Client.Interfaces;
using GBase.Client.Services.Factories; using GBase.Client.Services.Factories;
@ -21,12 +20,12 @@ namespace GBase.Client
/// <param name="settings">The <see cref="IGBaseClientSettings"/> for this client</param> /// <param name="settings">The <see cref="IGBaseClientSettings"/> for this client</param>
/// <param name="gBaseServiceFactory">The <see cref="IGBaseServiceFactory"/></param> /// <param name="gBaseServiceFactory">The <see cref="IGBaseServiceFactory"/></param>
/// <param name="gBaseTableServiceFactory">The <see cref="IGBaseTableServiceFactory"/></param> /// <param name="gBaseTableServiceFactory">The <see cref="IGBaseTableServiceFactory"/></param>
/// <param name="gBaseEntryServiceFactory">The <see cref="IGBaseEntryServiceFactory"/></param> /// <param name="gBaseColumnServiceFactory">The <see cref="IGBaseColumnServiceFactory"/></param>
public GBaseClient(IGBaseClientSettings settings, IGBaseServiceFactory gBaseServiceFactory, IGBaseTableServiceFactory gBaseTableServiceFactory, IGBaseEntryServiceFactory gBaseEntryServiceFactory) public GBaseClient(IGBaseClientSettings settings, IGBaseServiceFactory gBaseServiceFactory, IGBaseTableServiceFactory gBaseTableServiceFactory, IGBaseColumnServiceFactory gBaseColumnServiceFactory)
{ {
GBase = gBaseServiceFactory.Create(settings.Protocol, settings.ServerProtocolGBaseEndpointAddress); GBase = gBaseServiceFactory.Create(settings.Protocol, settings.ServerProtocolGBaseEndpointAddress);
GBaseTable = gBaseTableServiceFactory.Create(settings.Protocol, settings.ServerProtocolGBaseTableEndpointAddress); GBaseTable = gBaseTableServiceFactory.Create(settings.Protocol, settings.ServerProtocolGBaseTableEndpointAddress);
GBaseEntry = gBaseEntryServiceFactory.Create(settings.Protocol, settings.ServerProtocolGBaseEntryEndpointAddress); GBaseColumn = gBaseColumnServiceFactory.Create(settings.Protocol, settings.ServerProtocolGBaseColumnEndpointAddress);
} }
/// <summary> /// <summary>
@ -40,9 +39,9 @@ namespace GBase.Client
public IGBaseTableService GBaseTable { get; } public IGBaseTableService GBaseTable { get; }
/// <summary> /// <summary>
/// Functions of the GBaseEntry /// Functions of the GBaseColumn
/// </summary> /// </summary>
public IGBaseEntryService GBaseEntry { get; } public IGBaseColumnService GBaseColumn { get; }
/// <summary> /// <summary>
/// Dispose used resources asynchronously /// Dispose used resources asynchronously
@ -52,7 +51,7 @@ namespace GBase.Client
{ {
await GBase.DisposeAsync(); await GBase.DisposeAsync();
await GBaseTable.DisposeAsync(); await GBaseTable.DisposeAsync();
await GBaseEntry.DisposeAsync(); await GBaseColumn.DisposeAsync();
} }
} }
} }

@ -21,15 +21,15 @@ namespace GBase.Client
/// <param name="port">The port</param> /// <param name="port">The port</param>
/// <param name="gBaseEndpoint">The GBase endpoint</param> /// <param name="gBaseEndpoint">The GBase endpoint</param>
/// <param name="gBaseTableEndpoint">The GBaseTable endpoint</param> /// <param name="gBaseTableEndpoint">The GBaseTable endpoint</param>
/// <param name="gBaseEntryEndpoint">The GBaseEntry endpoint</param> /// <param name="gBaseColumnEndpoint">The GBaseColumn endpoint</param>
public GBaseClientSettings(ServerProtocol protocol, IPAddress ipAddress, int port, string gBaseEndpoint, string gBaseTableEndpoint, string gBaseEntryEndpoint) public GBaseClientSettings(ServerProtocol protocol, IPAddress ipAddress, int port, string gBaseEndpoint, string gBaseTableEndpoint, string gBaseColumnEndpoint)
{ {
Protocol = protocol; Protocol = protocol;
IpAddress = ipAddress; IpAddress = ipAddress;
Port = port; Port = port;
GBaseEndpoint = gBaseEndpoint; GBaseEndpoint = gBaseEndpoint;
GBaseTableEndpoint = gBaseTableEndpoint; GBaseTableEndpoint = gBaseTableEndpoint;
GBaseEntryEndpoint = gBaseEntryEndpoint; GBaseColumnEndpoint = gBaseColumnEndpoint;
} }
/// <summary> /// <summary>
@ -58,9 +58,9 @@ namespace GBase.Client
public string GBaseTableEndpoint { get; } public string GBaseTableEndpoint { get; }
/// <summary> /// <summary>
/// GBaseEntry endpoint the server listens to /// GBaseColumn endpoint the server listens to
/// </summary> /// </summary>
public string GBaseEntryEndpoint { get; } public string GBaseColumnEndpoint { get; }
/// <summary> /// <summary>
@ -74,8 +74,8 @@ namespace GBase.Client
public string ServerProtocolGBaseTableEndpointAddress => @$"{Protocol.GetProtocolString()}{IpAddress}:{Port}{GBaseTableEndpoint}"; public string ServerProtocolGBaseTableEndpointAddress => @$"{Protocol.GetProtocolString()}{IpAddress}:{Port}{GBaseTableEndpoint}";
/// <summary> /// <summary>
/// Complete GBaseEntry endpoint address based on the <see cref="ICommunicationSettings"/> /// Complete GBaseColumn endpoint address based on the <see cref="ICommunicationSettings"/>
/// </summary> /// </summary>
public string ServerProtocolGBaseEntryEndpointAddress => @$"{Protocol.GetProtocolString()}{IpAddress}:{Port}{GBaseEntryEndpoint}"; public string ServerProtocolGBaseColumnEndpointAddress => @$"{Protocol.GetProtocolString()}{IpAddress}:{Port}{GBaseColumnEndpoint}";
} }
} }

@ -27,7 +27,7 @@ namespace GBase.Client.Installers
//services //services
container.Register<IGBaseService, GBaseService>(); container.Register<IGBaseService, GBaseService>();
container.Register<IGBaseTableService, GBaseTableService>(); container.Register<IGBaseTableService, GBaseTableService>();
container.Register<IGBaseEntryService, GBaseEntryService>(); container.Register<IGBaseColumnService, GBaseColumnService>();
//factories //factories
container.RegisterFactory<IGBaseClientFactory>(); container.RegisterFactory<IGBaseClientFactory>();
@ -36,7 +36,7 @@ namespace GBase.Client.Installers
//service factories //service factories
container.RegisterFactory<IGBaseServiceFactory>(); container.RegisterFactory<IGBaseServiceFactory>();
container.RegisterFactory<IGBaseTableServiceFactory>(); container.RegisterFactory<IGBaseTableServiceFactory>();
container.RegisterFactory<IGBaseEntryServiceFactory>(); container.RegisterFactory<IGBaseColumnServiceFactory>();
} }
} }
} }

@ -23,8 +23,8 @@ namespace GBase.Client.Interfaces
IGBaseTableService GBaseTable { get; } IGBaseTableService GBaseTable { get; }
/// <summary> /// <summary>
/// Functions of the GBaseEntry /// Functions of the GBaseColumn
/// </summary> /// </summary>
IGBaseEntryService GBaseEntry { get; } IGBaseColumnService GBaseColumn { get; }
} }
} }

@ -22,8 +22,8 @@ namespace GBase.Client.Interfaces
string ServerProtocolGBaseTableEndpointAddress { get; } string ServerProtocolGBaseTableEndpointAddress { get; }
/// <summary> /// <summary>
/// Complete GBaseEntry endpoint address based on the <see cref="ICommunicationSettings"/> /// Complete GBaseColumn endpoint address based on the <see cref="ICommunicationSettings"/>
/// </summary> /// </summary>
string ServerProtocolGBaseEntryEndpointAddress { get; } string ServerProtocolGBaseColumnEndpointAddress { get; }
} }
} }

@ -9,16 +9,16 @@ using GBase.Api.Services;
namespace GBase.Client.Services.Factories namespace GBase.Client.Services.Factories
{ {
/// <summary> /// <summary>
/// Factory for the <see cref="IGBaseEntryService"/> /// Factory for the <see cref="IGBaseColumnService"/>
/// </summary> /// </summary>
public interface IGBaseEntryServiceFactory public interface IGBaseColumnServiceFactory
{ {
/// <summary> /// <summary>
/// Creates an <see cref="IGBaseEntryService"/> /// Creates an <see cref="IGBaseColumnService"/>
/// </summary> /// </summary>
/// <param name="serverProtocol">The <see cref="ServerProtocol"/></param> /// <param name="serverProtocol">The <see cref="ServerProtocol"/></param>
/// <param name="endpoint">The endpoint for the GBase</param> /// <param name="endpoint">The endpoint for the GBase</param>
/// <returns>A newly created instance of the implementation for <see cref="IGBaseEntryService"/></returns> /// <returns>A newly created instance of the implementation for <see cref="IGBaseColumnService"/></returns>
IGBaseEntryService Create(ServerProtocol serverProtocol, string endpoint); IGBaseColumnService Create(ServerProtocol serverProtocol, string endpoint);
} }
} }

@ -8,16 +8,16 @@ using GBase.Api.Services;
namespace GBase.Client.Services namespace GBase.Client.Services
{ {
/// <summary> /// <summary>
/// <see cref="Service{TService}"/> for the IGBaseEntry /// <see cref="Service{TService}"/> for the IGBaseColumn
/// </summary> /// </summary>
public class GBaseEntryService : Service<IGBaseEntryService>, IGBaseEntryService public class GBaseColumnService : Service<IGBaseColumnService>, IGBaseColumnService
{ {
/// <summary> /// <summary>
/// <see cref="Service{TService}"/> for the IGBaseEntry /// <see cref="Service{TService}"/> for the IGBaseColumn
/// </summary> /// </summary>
/// <param name="serverProtocol">The <see cref="ServerProtocol"/></param> /// <param name="serverProtocol">The <see cref="ServerProtocol"/></param>
/// <param name="endpoint">The endpoint for the GBaseEntry</param> /// <param name="endpoint">The endpoint for the GBaseColumn</param>
public GBaseEntryService(ServerProtocol serverProtocol, string endpoint) public GBaseColumnService(ServerProtocol serverProtocol, string endpoint)
: base(serverProtocol, endpoint) : base(serverProtocol, endpoint)
{ {

@ -24,13 +24,13 @@ namespace GBase.Client.Services
} }
/// <summary> /// <summary>
/// Add an entry to the GBaseTable /// Add a column to the GBaseTable
/// </summary> /// </summary>
/// <returns>True if successful, false if not</returns> /// <returns>True if successful, false if not</returns>
public bool AddEntry() public bool AddColumn()
{ {
IGBaseTableService channel = OpenChannel(); IGBaseTableService channel = OpenChannel();
bool ret = channel.AddEntry(); bool ret = channel.AddColumn();
CloseChannel(channel); CloseChannel(channel);
@ -38,13 +38,13 @@ namespace GBase.Client.Services
} }
/// <summary> /// <summary>
/// Remove an entry from the GBaseTable /// Remove a column from the GBaseTable
/// </summary> /// </summary>
/// <returns>True if successful, false if not</returns> /// <returns>True if successful, false if not</returns>
public bool RemoveEntry() public bool RemoveColumn()
{ {
IGBaseTableService channel = OpenChannel(); IGBaseTableService channel = OpenChannel();
bool ret = channel.RemoveEntry(); bool ret = channel.RemoveColumn();
CloseChannel(channel); CloseChannel(channel);

@ -17,14 +17,14 @@ namespace GBase.Server
{ {
public const string GBASE_ENDPOINT_STARTUP_CONFIGURATION_PREFIX = "GBaseEndpoint"; public const string GBASE_ENDPOINT_STARTUP_CONFIGURATION_PREFIX = "GBaseEndpoint";
public const string GBASE_TABLE_ENDPOINT_STARTUP_CONFIGURATION_PREFIX = "GBaseTableEndpoint"; public const string GBASE_TABLE_ENDPOINT_STARTUP_CONFIGURATION_PREFIX = "GBaseTableEndpoint";
public const string GBASE_ENTRY_ENDPOINT_STARTUP_CONFIGURATION_PREFIX = "GBaseEntryEndpoint"; public const string GBASE_COLUMN_ENDPOINT_STARTUP_CONFIGURATION_PREFIX = "GBaseColumnEndpoint";
private const string PROTOCOL_ARGUMENT_PREFIX = "-pr"; private const string PROTOCOL_ARGUMENT_PREFIX = "-pr";
private const string IP_ADDRESS_ARGUMENT_PREFIX = "-ip"; private const string IP_ADDRESS_ARGUMENT_PREFIX = "-ip";
private const string PORT_ARGUMENT_PREFIX = "-p"; private const string PORT_ARGUMENT_PREFIX = "-p";
private const string ENDPOINT_ARGUMENT_PREFIX = "-e"; private const string ENDPOINT_ARGUMENT_PREFIX = "-e";
private const string TABLE_ENDPOINT_ARGUMENT_PREFIX = "-et"; private const string TABLE_ENDPOINT_ARGUMENT_PREFIX = "-et";
private const string ENTRY_ENDPOINT_ARGUMENT_PREFIX = "-ee"; private const string COLUMN_ENDPOINT_ARGUMENT_PREFIX = "-ee";
private const string LOG_FILE_PATH_ARGUMENT_PREFIX = "-lp"; private const string LOG_FILE_PATH_ARGUMENT_PREFIX = "-lp";
private const string LOG_FILE_NAME_ARGUMENT_PREFIX = "-ln"; private const string LOG_FILE_NAME_ARGUMENT_PREFIX = "-ln";
@ -39,7 +39,7 @@ namespace GBase.Server
private bool _portInitialized; private bool _portInitialized;
private bool _gBaseEndpointInitialized; private bool _gBaseEndpointInitialized;
private bool _gBaseTableEndpointInitialized; private bool _gBaseTableEndpointInitialized;
private bool _gBaseEntryEndpointInitialized; private bool _gBaseColumnEndpointInitialized;
private bool _logFilePathInitialized; private bool _logFilePathInitialized;
private bool _logFileNameInitialized; private bool _logFileNameInitialized;
@ -49,7 +49,7 @@ namespace GBase.Server
public int Port { get; private set; } public int Port { get; private set; }
public string GBaseEndpoint { get; private set; } public string GBaseEndpoint { get; private set; }
public string GBaseTableEndpoint { get; private set; } public string GBaseTableEndpoint { get; private set; }
public string GBaseEntryEndpoint { get; private set; } public string GBaseColumnEndpoint { get; private set; }
public string LogFilePath { get; private set; } public string LogFilePath { get; private set; }
public string LogFileName { get; private set; } public string LogFileName { get; private set; }
@ -98,13 +98,13 @@ namespace GBase.Server
GBaseTableEndpoint = args[index]; GBaseTableEndpoint = args[index];
_gBaseTableEndpointInitialized = true; _gBaseTableEndpointInitialized = true;
} }
else if (args[index] == ENTRY_ENDPOINT_ARGUMENT_PREFIX) else if (args[index] == COLUMN_ENDPOINT_ARGUMENT_PREFIX)
{ {
index++; index++;
await VerifyArgsLength(index, args.Length); await VerifyArgsLength(index, args.Length);
GBaseEntryEndpoint = args[index]; GBaseColumnEndpoint = args[index];
_gBaseEntryEndpointInitialized = true; _gBaseColumnEndpointInitialized = true;
} }
else if (args[index] == LOG_FILE_PATH_ARGUMENT_PREFIX) else if (args[index] == LOG_FILE_PATH_ARGUMENT_PREFIX)
{ {
@ -152,7 +152,7 @@ namespace GBase.Server
LogFileName = _defaultLogFileName; LogFileName = _defaultLogFileName;
//mandatory settings //mandatory settings
if (_protocolInitialized && _ipAddressInitialized && _portInitialized && _gBaseEndpointInitialized && _gBaseTableEndpointInitialized && _gBaseEntryEndpointInitialized) if (_protocolInitialized && _ipAddressInitialized && _portInitialized && _gBaseEndpointInitialized && _gBaseTableEndpointInitialized && _gBaseColumnEndpointInitialized)
return true; return true;
await PrintHelp(); await PrintHelp();
@ -167,7 +167,7 @@ namespace GBase.Server
await Log.Write<GBaseServerSettings>($"{PORT_ARGUMENT_PREFIX}: The used port"); await Log.Write<GBaseServerSettings>($"{PORT_ARGUMENT_PREFIX}: The used port");
await Log.Write<GBaseServerSettings>($"{ENDPOINT_ARGUMENT_PREFIX}: The used GBase endpoint"); await Log.Write<GBaseServerSettings>($"{ENDPOINT_ARGUMENT_PREFIX}: The used GBase endpoint");
await Log.Write<GBaseServerSettings>($"{TABLE_ENDPOINT_ARGUMENT_PREFIX}: The used GBase table endpoint"); await Log.Write<GBaseServerSettings>($"{TABLE_ENDPOINT_ARGUMENT_PREFIX}: The used GBase table endpoint");
await Log.Write<GBaseServerSettings>($"{ENTRY_ENDPOINT_ARGUMENT_PREFIX}: The used GBase entry endpoint"); await Log.Write<GBaseServerSettings>($"{COLUMN_ENDPOINT_ARGUMENT_PREFIX}: The used GBase column endpoint");
await Log.Write<GBaseServerSettings>(""); await Log.Write<GBaseServerSettings>("");
await Log.Write<GBaseServerSettings>("Optional Arguments:"); await Log.Write<GBaseServerSettings>("Optional Arguments:");
await Log.Write<GBaseServerSettings>($"{LOG_FILE_PATH_ARGUMENT_PREFIX}: The path to the server log file (default: '{_defaultLogFilePath}')"); await Log.Write<GBaseServerSettings>($"{LOG_FILE_PATH_ARGUMENT_PREFIX}: The path to the server log file (default: '{_defaultLogFilePath}')");

@ -68,7 +68,7 @@ namespace GBase.Server
{ {
$"--{GBaseServerSettings.GBASE_ENDPOINT_STARTUP_CONFIGURATION_PREFIX}", serverSettings.GBaseEndpoint, $"--{GBaseServerSettings.GBASE_ENDPOINT_STARTUP_CONFIGURATION_PREFIX}", serverSettings.GBaseEndpoint,
$"--{GBaseServerSettings.GBASE_TABLE_ENDPOINT_STARTUP_CONFIGURATION_PREFIX}", serverSettings.GBaseTableEndpoint, $"--{GBaseServerSettings.GBASE_TABLE_ENDPOINT_STARTUP_CONFIGURATION_PREFIX}", serverSettings.GBaseTableEndpoint,
$"--{GBaseServerSettings.GBASE_ENTRY_ENDPOINT_STARTUP_CONFIGURATION_PREFIX}", serverSettings.GBaseEntryEndpoint $"--{GBaseServerSettings.GBASE_COLUMN_ENDPOINT_STARTUP_CONFIGURATION_PREFIX}", serverSettings.GBaseColumnEndpoint
}); });
}) })
.UseStartup<Startup>(); .UseStartup<Startup>();

@ -7,7 +7,7 @@ using GBase.Api.Services;
namespace GBase.Server.Services namespace GBase.Server.Services
{ {
public class GBaseEntryService : IGBaseEntryService public class GBaseColumnService : IGBaseColumnService
{ {
public void Dummy() public void Dummy()
{ {

@ -9,12 +9,12 @@ namespace GBase.Server.Services
{ {
public class GBaseTableService : IGBaseTableService public class GBaseTableService : IGBaseTableService
{ {
public bool AddEntry() public bool AddColumn()
{ {
throw new System.NotImplementedException(); throw new System.NotImplementedException();
} }
public bool RemoveEntry() public bool RemoveColumn()
{ {
throw new System.NotImplementedException(); throw new System.NotImplementedException();
} }

@ -37,8 +37,8 @@ namespace GBase.Server
builder.AddService<GBaseTableService>(); builder.AddService<GBaseTableService>();
builder.AddServiceEndpoint<GBaseTableService, IGBaseTableService>(new BasicHttpBinding(), _configuration[GBaseServerSettings.GBASE_TABLE_ENDPOINT_STARTUP_CONFIGURATION_PREFIX]); builder.AddServiceEndpoint<GBaseTableService, IGBaseTableService>(new BasicHttpBinding(), _configuration[GBaseServerSettings.GBASE_TABLE_ENDPOINT_STARTUP_CONFIGURATION_PREFIX]);
builder.AddService<GBaseEntryService>(); builder.AddService<GBaseColumnService>();
builder.AddServiceEndpoint<GBaseEntryService, IGBaseEntryService>(new BasicHttpBinding(), _configuration[GBaseServerSettings.GBASE_ENTRY_ENDPOINT_STARTUP_CONFIGURATION_PREFIX]); builder.AddServiceEndpoint<GBaseColumnService, IGBaseColumnService>(new BasicHttpBinding(), _configuration[GBaseServerSettings.GBASE_COLUMN_ENDPOINT_STARTUP_CONFIGURATION_PREFIX]);
}); });
} }
} }

@ -8,14 +8,14 @@ using GBase.Interfaces;
namespace GBase.Attributes namespace GBase.Attributes
{ {
/// <summary> /// <summary>
/// Tags a property as an <see cref="IGBaseEntry"/> /// Tags a property as an <see cref="IGBaseColumn"/>
/// </summary> /// </summary>
[AttributeUsage(AttributeTargets.Property)] [AttributeUsage(AttributeTargets.Property)]
public class GBaseEntryAttribute : Attribute public class GBaseColumnAttribute : Attribute
{ {
/// <summary> /// <summary>
/// The value of the linked property changed /// The value of the linked property changed
/// </summary> /// </summary>
public event EventHandler ValueChanged; //TODO: Automatically fire this event if the value of the linked property changes and subscribe to it in the correct IGBaseEntry public event EventHandler ValueChanged; //TODO: Automatically fire this event if the value of the linked property changes and subscribe to it in the correct IGBaseColumn (remove?)
} }
} }

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using GBase.Attributes;
using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.CSharp.Syntax;
@ -11,28 +12,42 @@ using Microsoft.CodeAnalysis.Diagnostics;
namespace GBase.Diagnosis namespace GBase.Diagnosis
{ {
[DiagnosticAnalyzer(LanguageNames.CSharp)] [DiagnosticAnalyzer(LanguageNames.CSharp)]
public class GBaseTableEntryAnalyzer : DiagnosticAnalyzer public class GBaseTableColumnAnalyzer : DiagnosticAnalyzer
{ {
private const string DIAGNOSTIC_ID = "GBaseTableEntryAnalyzer"; private const string DIAGNOSTIC_ID = "GBaseTableColumnAnalyzer";
private const string CATEGORY = "GBaseTableEntryAnalyzer Category"; private const string CATEGORY = "GBaseTableColumnAnalyzer Category";
private static readonly LocalizableString _title = "Missing GBaseEntries for this GBaseTable"; private static readonly LocalizableString _title = "Missing GBaseColumns for this GBaseTable";
private static readonly LocalizableString _messageFormat = "Type '{0}' is marked as GBaseTable but doesn't contain any GBase entries."; private static readonly LocalizableString _messageFormat = "Type '{0}' is marked as GBaseTable but doesn't contain any GBase columns.";
private static readonly DiagnosticDescriptor _rule = new DiagnosticDescriptor(DIAGNOSTIC_ID, _title, _messageFormat, CATEGORY, DiagnosticSeverity.Warning, true); private static readonly DiagnosticDescriptor _rule = new DiagnosticDescriptor(DIAGNOSTIC_ID, _title, _messageFormat, CATEGORY, DiagnosticSeverity.Warning, true);
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get { return ImmutableArray.Create(_rule); } } private bool _nodeAnalyzed;
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(_rule);
private List<ClassDeclarationSyntax> TableClasses { get; }
public override void Initialize(AnalysisContext context) public override void Initialize(AnalysisContext context)
{ {
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics); context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics);
context.EnableConcurrentExecution(); context.EnableConcurrentExecution();
context.RegisterSyntaxNodeAction(AnalyzeNode, SyntaxKind.Attribute); context.RegisterSyntaxNodeAction(AnalyzeClass, SyntaxKind.ClassDeclaration);
context.RegisterSyntaxNodeAction(AnalyzeMethod, SyntaxKind.MethodDeclaration);
} }
private void AnalyzeNode(SyntaxNodeAnalysisContext context) private void AnalyzeClass(SyntaxNodeAnalysisContext context)
{ {
AttributeSyntax attribute = (AttributeSyntax) context.Node; ClassDeclarationSyntax classDeclaration = (ClassDeclarationSyntax) context.Node;
if (!classDeclaration.AttributeLists.SelectMany(l => l.Attributes).Any(a => a.Name.ToString().Equals(nameof(GBaseTableAttribute))))
return;
_nodeAnalyzed = true;
}
private void AnalyzeMethod(SyntaxNodeAnalysisContext context)
{
} }
} }
} }

@ -8,14 +8,14 @@ using GBase.Interfaces;
namespace GBase.Factories namespace GBase.Factories
{ {
/// <summary> /// <summary>
/// Factory for the <see cref="IGBaseEntry"/> /// Factory for the <see cref="IGBaseColumn"/>
/// </summary> /// </summary>
public interface IGBaseEntryFactory public interface IGBaseColumnFactory
{ {
/// <summary> /// <summary>
/// Creates an <see cref="IGBaseEntry"/> /// Creates an <see cref="IGBaseColumn"/>
/// </summary> /// </summary>
/// <returns>A newly created instance of the implementation for <see cref="IGBaseEntry"/></returns> /// <returns>A newly created instance of the implementation for <see cref="IGBaseColumn"/></returns>
IGBaseEntry Create(); IGBaseColumn Create();
} }
} }

@ -4,12 +4,12 @@
<name>GBase</name> <name>GBase</name>
</assembly> </assembly>
<members> <members>
<member name="T:GBase.Attributes.GBaseEntryAttribute"> <member name="T:GBase.Attributes.GBaseColumnAttribute">
<summary> <summary>
Tags a property as an <see cref="T:GBase.Interfaces.IGBaseEntry"/> Tags a property as an <see cref="T:GBase.Interfaces.IGBaseColumn"/>
</summary> </summary>
</member> </member>
<member name="E:GBase.Attributes.GBaseEntryAttribute.ValueChanged"> <member name="E:GBase.Attributes.GBaseColumnAttribute.ValueChanged">
<summary> <summary>
The value of the linked property changed The value of the linked property changed
</summary> </summary>
@ -360,16 +360,16 @@
The <see cref="T:System.Type"/> of the passed interface The <see cref="T:System.Type"/> of the passed interface
</summary> </summary>
</member> </member>
<member name="T:GBase.Factories.IGBaseEntryFactory"> <member name="T:GBase.Factories.IGBaseColumnFactory">
<summary> <summary>
Factory for the <see cref="T:GBase.Interfaces.IGBaseEntry"/> Factory for the <see cref="T:GBase.Interfaces.IGBaseColumn"/>
</summary> </summary>
</member> </member>
<member name="M:GBase.Factories.IGBaseEntryFactory.Create"> <member name="M:GBase.Factories.IGBaseColumnFactory.Create">
<summary> <summary>
Creates an <see cref="T:GBase.Interfaces.IGBaseEntry"/> Creates an <see cref="T:GBase.Interfaces.IGBaseColumn"/>
</summary> </summary>
<returns>A newly created instance of the implementation for <see cref="T:GBase.Interfaces.IGBaseEntry"/></returns> <returns>A newly created instance of the implementation for <see cref="T:GBase.Interfaces.IGBaseColumn"/></returns>
</member> </member>
<member name="T:GBase.Factories.IGBaseFactory"> <member name="T:GBase.Factories.IGBaseFactory">
<summary> <summary>
@ -410,6 +410,17 @@
Internal file handler Internal file handler
</summary> </summary>
</member> </member>
<member name="M:GBase.FileHandling.FileHandler.#ctor(GBase.DataHandling.Factories.IXmlDataHandlerFactory)">
<summary>
Internal file handler
</summary>
<param name="xmlDataHandlerFactory">Factory for the <see cref="T:GBase.Interfaces.DataHandling.Xml.IXmlDataHandler"/></param>
</member>
<member name="P:GBase.FileHandling.FileHandler.DataHandler">
<summary>
The <see cref="T:GBase.Interfaces.DataHandling.IDataHandler"/> of this <see cref="T:GBase.Interfaces.FileHandling.IFileHandler"/>
</summary>
</member>
<member name="M:GBase.FileHandling.FileHandler.Init(System.String,System.Threading.CancellationToken)"> <member name="M:GBase.FileHandling.FileHandler.Init(System.String,System.Threading.CancellationToken)">
<summary> <summary>
Initialize this <see cref="T:GBase.Interfaces.FileHandling.IFileHandler"/> Initialize this <see cref="T:GBase.Interfaces.FileHandling.IFileHandler"/>
@ -418,6 +429,44 @@
<param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken"/> to cancel the asynchronous operation</param> <param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken"/> to cancel the asynchronous operation</param>
<returns>True if successful, false if not</returns> <returns>True if successful, false if not</returns>
</member> </member>
<member name="M:GBase.FileHandling.FileHandler.SetValue``2(System.String,``1)">
<summary>
Set the value for the given property
</summary>
<typeparam name="T">The <see cref="T:System.Type"/> of the property</typeparam>
<typeparam name="TProperty">The <see cref="T:System.Type"/> of the property</typeparam>
<param name="propertyName">The name of the property</param>
<param name="value">The value to set</param>
<returns>A <see cref="T:System.Threading.Tasks.Task"/> to await</returns>
</member>
<member name="M:GBase.FileHandling.FileHandler.RemoveValue``2(System.String,``1)">
<summary>
Remove the value for the given property
</summary>
<typeparam name="T">The <see cref="T:System.Type"/> of the property</typeparam>
<typeparam name="TProperty">The <see cref="T:System.Type"/> of the property</typeparam>
<param name="propertyName">The name of the property</param>
<param name="value">The value to set</param>
<returns>A <see cref="T:System.Threading.Tasks.Task"/> to await</returns>
</member>
<member name="M:GBase.FileHandling.FileHandler.GetValue``2(System.String)">
<summary>
Get the value for the given property, if multiple values are set the first is returned
</summary>
<typeparam name="T">The <see cref="T:System.Type"/> of the property</typeparam>
<typeparam name="TProperty">The <see cref="T:System.Type"/> of the property</typeparam>
<param name="propertyName">The name of the property</param>
<returns>The value for the given property</returns>
</member>
<member name="M:GBase.FileHandling.FileHandler.GetValues``2(System.String)">
<summary>
Get all the values that are set for the given property
</summary>
<typeparam name="T">The <see cref="T:System.Type"/> of the property</typeparam>
<typeparam name="TProperty">The <see cref="T:System.Type"/> of the property</typeparam>
<param name="propertyName">The name of the property</param>
<returns>An <see cref="T:System.Collections.Generic.IEnumerable`1"/> with all the values for the property</returns>
</member>
<member name="M:GBase.FileHandling.FileHandler.DisposeAsync"> <member name="M:GBase.FileHandling.FileHandler.DisposeAsync">
<summary> <summary>
Dispose used resources asynchronously Dispose used resources asynchronously
@ -485,22 +534,28 @@
</summary> </summary>
<returns>A <see cref="T:System.Threading.Tasks.ValueTask"/> to await</returns> <returns>A <see cref="T:System.Threading.Tasks.ValueTask"/> to await</returns>
</member> </member>
<member name="T:GBase.GBaseEntry"> <member name="T:GBase.GBaseColumn">
<summary> <summary>
An entry of a <see cref="T:GBase.Interfaces.IGBaseTable"/> A column of a <see cref="T:GBase.Interfaces.IGBaseTable"/>
</summary> </summary>
</member> </member>
<member name="M:GBase.GBaseEntry.#ctor"> <member name="M:GBase.GBaseColumn.#ctor">
<summary> <summary>
An entry of a <see cref="T:GBase.Interfaces.IGBaseTable"/> A column of a <see cref="T:GBase.Interfaces.IGBaseTable"/>
</summary>
</member>
<member name="M:GBase.GBaseColumn.DisposeAsync">
<summary>
The <see cref="M:System.IAsyncDisposable.DisposeAsync"/> method
</summary> </summary>
<returns>A <see cref="T:System.Threading.Tasks.ValueTask"/> to await</returns>
</member> </member>
<member name="T:GBase.GBaseTable"> <member name="T:GBase.GBaseTable">
<summary> <summary>
A <see cref="T:GBase.Interfaces.IGBase"/> table A <see cref="T:GBase.Interfaces.IGBase"/> table
</summary> </summary>
</member> </member>
<member name="M:GBase.GBaseTable.#ctor(GBase.FileHandling.Factories.IFileHandlerFactory,GBase.Factories.IGBaseEntryFactory)"> <member name="M:GBase.GBaseTable.#ctor(GBase.FileHandling.Factories.IFileHandlerFactory,GBase.Factories.IGBaseColumnFactory)">
<summary> <summary>
A <see cref="T:GBase.Interfaces.IGBase"/> table A <see cref="T:GBase.Interfaces.IGBase"/> table
</summary> </summary>
@ -515,9 +570,9 @@
The name of this <see cref="T:GBase.Interfaces.IGBaseTable"/> The name of this <see cref="T:GBase.Interfaces.IGBaseTable"/>
</summary> </summary>
</member> </member>
<member name="P:GBase.GBaseTable.Entries"> <member name="P:GBase.GBaseTable.Columns">
<summary> <summary>
The <see cref="T:GBase.Interfaces.IGBaseEntry"/>s of this <see cref="T:GBase.Interfaces.IGBaseTable"/> The <see cref="T:GBase.Interfaces.IGBaseColumn"/>s of this <see cref="T:GBase.Interfaces.IGBaseTable"/>
</summary> </summary>
</member> </member>
<member name="M:GBase.GBaseTable.Init(System.Type,System.String,System.String,System.Threading.CancellationToken)"> <member name="M:GBase.GBaseTable.Init(System.Type,System.String,System.String,System.Threading.CancellationToken)">
@ -530,18 +585,18 @@
<param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken"/> to cancel the asynchronous operation</param> <param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken"/> to cancel the asynchronous operation</param>
<returns>True if successful, false if not</returns> <returns>True if successful, false if not</returns>
</member> </member>
<member name="M:GBase.GBaseTable.AddEntry(GBase.Interfaces.IGBaseEntry)"> <member name="M:GBase.GBaseTable.AddColumn(GBase.Interfaces.IGBaseColumn)">
<summary> <summary>
Add a given <see cref="T:GBase.Interfaces.IGBaseEntry"/> to this <see cref="T:GBase.Interfaces.IGBaseTable"/> Add a given <see cref="T:GBase.Interfaces.IGBaseColumn"/> to this <see cref="T:GBase.Interfaces.IGBaseTable"/>
</summary> </summary>
<param name="entry">The given <see cref="T:GBase.Interfaces.IGBaseEntry"/></param> <param name="column">The given <see cref="T:GBase.Interfaces.IGBaseColumn"/></param>
<returns>True if successful, false if not</returns> <returns>True if successful, false if not</returns>
</member> </member>
<member name="M:GBase.GBaseTable.RemoveEntry(GBase.Interfaces.IGBaseEntry)"> <member name="M:GBase.GBaseTable.RemoveColumn(GBase.Interfaces.IGBaseColumn)">
<summary> <summary>
Remove a given <see cref="T:GBase.Interfaces.IGBaseEntry"/> from this <see cref="T:GBase.Interfaces.IGBaseTable"/> Remove a given <see cref="T:GBase.Interfaces.IGBaseColumn"/> from this <see cref="T:GBase.Interfaces.IGBaseTable"/>
</summary> </summary>
<param name="entry">The given <see cref="T:GBase.Interfaces.IGBaseEntry"/></param> <param name="column">The given <see cref="T:GBase.Interfaces.IGBaseColumn"/></param>
<returns>True if successful, false if not</returns> <returns>True if successful, false if not</returns>
</member> </member>
<member name="M:GBase.GBaseTable.DisposeAsync"> <member name="M:GBase.GBaseTable.DisposeAsync">
@ -807,6 +862,44 @@
<param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken"/> to cancel the asynchronous operation</param> <param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken"/> to cancel the asynchronous operation</param>
<returns>True if successful, false if not</returns> <returns>True if successful, false if not</returns>
</member> </member>
<member name="M:GBase.Interfaces.FileHandling.IFileHandler.SetValue``2(System.String,``1)">
<summary>
Set the value for the given property
</summary>
<typeparam name="T">The <see cref="T:System.Type"/> of the property</typeparam>
<typeparam name="TProperty">The <see cref="T:System.Type"/> of the property</typeparam>
<param name="propertyName">The name of the property</param>
<param name="value">The value to set</param>
<returns>A <see cref="T:System.Threading.Tasks.Task"/> to await</returns>
</member>
<member name="M:GBase.Interfaces.FileHandling.IFileHandler.RemoveValue``2(System.String,``1)">
<summary>
Remove the value for the given property
</summary>
<typeparam name="T">The <see cref="T:System.Type"/> of the property</typeparam>
<typeparam name="TProperty">The <see cref="T:System.Type"/> of the property</typeparam>
<param name="propertyName">The name of the property</param>
<param name="value">The value to set</param>
<returns>A <see cref="T:System.Threading.Tasks.Task"/> to await</returns>
</member>
<member name="M:GBase.Interfaces.FileHandling.IFileHandler.GetValue``2(System.String)">
<summary>
Get the value for the given property, if multiple values are set the first is returned
</summary>
<typeparam name="T">The <see cref="T:System.Type"/> of the property</typeparam>
<typeparam name="TProperty">The <see cref="T:System.Type"/> of the property</typeparam>
<param name="propertyName">The name of the property</param>
<returns>The value for the given property</returns>
</member>
<member name="M:GBase.Interfaces.FileHandling.IFileHandler.GetValues``2(System.String)">
<summary>
Get all the values that are set for the given property
</summary>
<typeparam name="T">The <see cref="T:System.Type"/> of the property</typeparam>
<typeparam name="TProperty">The <see cref="T:System.Type"/> of the property</typeparam>
<param name="propertyName">The name of the property</param>
<returns>An <see cref="T:System.Collections.Generic.IEnumerable`1"/> with all the values for the property</returns>
</member>
<member name="T:GBase.Interfaces.IGBase"> <member name="T:GBase.Interfaces.IGBase">
<summary> <summary>
The base class of the GBase database The base class of the GBase database
@ -850,9 +943,9 @@
<param name="table">The given <see cref="T:GBase.Interfaces.IGBaseTable"/></param> <param name="table">The given <see cref="T:GBase.Interfaces.IGBaseTable"/></param>
<returns>True if successful, false if not</returns> <returns>True if successful, false if not</returns>
</member> </member>
<member name="T:GBase.Interfaces.IGBaseEntry"> <member name="T:GBase.Interfaces.IGBaseColumn">
<summary> <summary>
An entry of a <see cref="T:GBase.Interfaces.IGBaseTable"/> A column of a <see cref="T:GBase.Interfaces.IGBaseTable"/>
</summary> </summary>
</member> </member>
<member name="T:GBase.Interfaces.IGBaseTable"> <member name="T:GBase.Interfaces.IGBaseTable">
@ -870,9 +963,9 @@
The name of this <see cref="T:GBase.Interfaces.IGBaseTable"/> The name of this <see cref="T:GBase.Interfaces.IGBaseTable"/>
</summary> </summary>
</member> </member>
<member name="P:GBase.Interfaces.IGBaseTable.Entries"> <member name="P:GBase.Interfaces.IGBaseTable.Columns">
<summary> <summary>
The <see cref="T:GBase.Interfaces.IGBaseEntry"/>s of this <see cref="T:GBase.Interfaces.IGBaseTable"/> The <see cref="T:GBase.Interfaces.IGBaseColumn"/>s of this <see cref="T:GBase.Interfaces.IGBaseTable"/>
</summary> </summary>
</member> </member>
<member name="M:GBase.Interfaces.IGBaseTable.Init(System.Type,System.String,System.String,System.Threading.CancellationToken)"> <member name="M:GBase.Interfaces.IGBaseTable.Init(System.Type,System.String,System.String,System.Threading.CancellationToken)">
@ -885,18 +978,18 @@
<param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken"/> to cancel the asynchronous operation</param> <param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken"/> to cancel the asynchronous operation</param>
<returns>True if successful, false if not</returns> <returns>True if successful, false if not</returns>
</member> </member>
<member name="M:GBase.Interfaces.IGBaseTable.AddEntry(GBase.Interfaces.IGBaseEntry)"> <member name="M:GBase.Interfaces.IGBaseTable.AddColumn(GBase.Interfaces.IGBaseColumn)">
<summary> <summary>
Add a given <see cref="T:GBase.Interfaces.IGBaseEntry"/> to this <see cref="T:GBase.Interfaces.IGBaseTable"/> Add a given <see cref="T:GBase.Interfaces.IGBaseColumn"/> to this <see cref="T:GBase.Interfaces.IGBaseTable"/>
</summary> </summary>
<param name="entry">The given <see cref="T:GBase.Interfaces.IGBaseEntry"/></param> <param name="column">The given <see cref="T:GBase.Interfaces.IGBaseColumn"/></param>
<returns>True if successful, false if not</returns> <returns>True if successful, false if not</returns>
</member> </member>
<member name="M:GBase.Interfaces.IGBaseTable.RemoveEntry(GBase.Interfaces.IGBaseEntry)"> <member name="M:GBase.Interfaces.IGBaseTable.RemoveColumn(GBase.Interfaces.IGBaseColumn)">
<summary> <summary>
Remove a given <see cref="T:GBase.Interfaces.IGBaseEntry"/> from this <see cref="T:GBase.Interfaces.IGBaseTable"/> Remove a given <see cref="T:GBase.Interfaces.IGBaseColumn"/> from this <see cref="T:GBase.Interfaces.IGBaseTable"/>
</summary> </summary>
<param name="entry">The given <see cref="T:GBase.Interfaces.IGBaseEntry"/></param> <param name="column">The given <see cref="T:GBase.Interfaces.IGBaseColumn"/></param>
<returns>True if successful, false if not</returns> <returns>True if successful, false if not</returns>
</member> </member>
<member name="T:GBase.Interfaces.Settings.IGBaseSettings"> <member name="T:GBase.Interfaces.Settings.IGBaseSettings">

@ -9,14 +9,14 @@ using GBase.Interfaces;
namespace GBase namespace GBase
{ {
/// <summary> /// <summary>
/// An entry of a <see cref="IGBaseTable"/> /// A column of a <see cref="IGBaseTable"/>
/// </summary> /// </summary>
public class GBaseEntry : IGBaseEntry public class GBaseColumn : IGBaseColumn
{ {
/// <summary> /// <summary>
/// An entry of a <see cref="IGBaseTable"/> /// A column of a <see cref="IGBaseTable"/>
/// </summary> /// </summary>
public GBaseEntry() public GBaseColumn()
{ {
} }

@ -22,16 +22,16 @@ namespace GBase
public class GBaseTable : IGBaseTable public class GBaseTable : IGBaseTable
{ {
private readonly IFileHandler _fileHandler; private readonly IFileHandler _fileHandler;
private readonly IGBaseEntryFactory _gBaseEntryFactory; private readonly IGBaseColumnFactory _gBaseColumnFactory;
/// <summary> /// <summary>
/// A <see cref="IGBase"/> table /// A <see cref="IGBase"/> table
/// </summary> /// </summary>
public GBaseTable(IFileHandlerFactory fileHandlerFactory, IGBaseEntryFactory gBaseEntryFactory) public GBaseTable(IFileHandlerFactory fileHandlerFactory, IGBaseColumnFactory gBaseColumnFactory)
{ {
_fileHandler = fileHandlerFactory.Create(); _fileHandler = fileHandlerFactory.Create();
_gBaseEntryFactory = gBaseEntryFactory; _gBaseColumnFactory = gBaseColumnFactory;
Entries = new List<IGBaseEntry>(); Columns = new List<IGBaseColumn>();
} }
/// <summary> /// <summary>
@ -45,9 +45,9 @@ namespace GBase
public string Name { get; private set; } public string Name { get; private set; }
/// <summary> /// <summary>
/// The <see cref="IGBaseEntry"/>s of this <see cref="IGBaseTable"/> /// The <see cref="IGBaseColumn"/>s of this <see cref="IGBaseTable"/>
/// </summary> /// </summary>
public List<IGBaseEntry> Entries { get; } public List<IGBaseColumn> Columns { get; }
/// <summary> /// <summary>
@ -67,45 +67,45 @@ namespace GBase
string path = Path.Combine(databasePath, fileName); string path = Path.Combine(databasePath, fileName);
await _fileHandler.Init(path, cancellationToken); await _fileHandler.Init(path, cancellationToken);
//TODO: Init Entries list depending on GBaseEntryAttributes set for this GBaseTable //TODO: Init columns list depending on GBaseColumnAttributes set for this GBaseTable
foreach (var property in type.GetProperties()) foreach (var property in type.GetProperties())
{ {
GBaseEntryAttribute gBaseEntryAttribute = property.GetCustomAttribute<GBaseEntryAttribute>(); GBaseColumnAttribute gBaseColumnAttribute = property.GetCustomAttribute<GBaseColumnAttribute>();
if (gBaseEntryAttribute == null) if (gBaseColumnAttribute == null)
continue; continue;
IGBaseEntry gBaseEntry = _gBaseEntryFactory.Create(); IGBaseColumn gBaseColumn = _gBaseColumnFactory.Create();
AddEntry(gBaseEntry); AddColumn(gBaseColumn);
} }
return true; return true;
} }
/// <summary> /// <summary>
/// Add a given <see cref="IGBaseEntry"/> to this <see cref="IGBaseTable"/> /// Add a given <see cref="IGBaseColumn"/> to this <see cref="IGBaseTable"/>
/// </summary> /// </summary>
/// <param name="entry">The given <see cref="IGBaseEntry"/></param> /// <param name="column">The given <see cref="IGBaseColumn"/></param>
/// <returns>True if successful, false if not</returns> /// <returns>True if successful, false if not</returns>
public bool AddEntry(IGBaseEntry entry) public bool AddColumn(IGBaseColumn column)
{ {
if (Entries.Contains(entry)) if (Columns.Contains(column))
return false; return false;
Entries.Add(entry); Columns.Add(column);
return true; return true;
} }
/// <summary> /// <summary>
/// Remove a given <see cref="IGBaseEntry"/> from this <see cref="IGBaseTable"/> /// Remove a given <see cref="IGBaseColumn"/> from this <see cref="IGBaseTable"/>
/// </summary> /// </summary>
/// <param name="entry">The given <see cref="IGBaseEntry"/></param> /// <param name="column">The given <see cref="IGBaseColumn"/></param>
/// <returns>True if successful, false if not</returns> /// <returns>True if successful, false if not</returns>
public bool RemoveEntry(IGBaseEntry entry) public bool RemoveColumn(IGBaseColumn column)
{ {
if (!Entries.Contains(entry)) if (!Columns.Contains(column))
return false; return false;
return Entries.Remove(entry); return Columns.Remove(column);
} }
/// <summary> /// <summary>
@ -116,12 +116,12 @@ namespace GBase
{ {
await _fileHandler.DisposeAsync(); await _fileHandler.DisposeAsync();
foreach (var entry in Entries) foreach (var column in Columns)
{ {
await entry.DisposeAsync(); await column.DisposeAsync();
} }
Entries.Clear(); Columns.Clear();
} }
} }
} }

@ -20,12 +20,12 @@ namespace GBase.Installers
{ {
container.Register<IGBase, GBase>(); container.Register<IGBase, GBase>();
container.Register<IGBaseTable, GBaseTable>(); container.Register<IGBaseTable, GBaseTable>();
container.Register<IGBaseEntry, GBaseEntry>(); container.Register<IGBaseColumn, GBaseColumn>();
//factories //factories
container.RegisterFactory<IGBaseFactory>(); container.RegisterFactory<IGBaseFactory>();
container.RegisterFactory<IGBaseTableFactory>(); container.RegisterFactory<IGBaseTableFactory>();
container.RegisterFactory<IGBaseEntryFactory>(); container.RegisterFactory<IGBaseColumnFactory>();
} }
} }
} }

@ -7,9 +7,9 @@ using System;
namespace GBase.Interfaces namespace GBase.Interfaces
{ {
/// <summary> /// <summary>
/// An entry of a <see cref="IGBaseTable"/> /// A column of a <see cref="IGBaseTable"/>
/// </summary> /// </summary>
public interface IGBaseEntry : IAsyncDisposable //TODO: Make entry generic (generic type is type of the value of the entry?) public interface IGBaseColumn : IAsyncDisposable //TODO: Make column generic (generic type is type of the value of the column?)?
{ {
} }

@ -25,9 +25,9 @@ namespace GBase.Interfaces
string Name { get; } string Name { get; }
/// <summary> /// <summary>
/// The <see cref="IGBaseEntry"/>s of this <see cref="IGBaseTable"/> /// The <see cref="IGBaseColumn"/>s of this <see cref="IGBaseTable"/>
/// </summary> /// </summary>
List<IGBaseEntry> Entries { get; } List<IGBaseColumn> Columns { get; }
/// <summary> /// <summary>
/// Initialize this <see cref="IGBase"/> /// Initialize this <see cref="IGBase"/>
@ -40,18 +40,18 @@ namespace GBase.Interfaces
Task<bool> Init(Type type, string name, string databasePath, CancellationToken cancellationToken); Task<bool> Init(Type type, string name, string databasePath, CancellationToken cancellationToken);
/// <summary> /// <summary>
/// Add a given <see cref="IGBaseEntry"/> to this <see cref="IGBaseTable"/> /// Add a given <see cref="IGBaseColumn"/> to this <see cref="IGBaseTable"/>
/// </summary> /// </summary>
/// <param name="entry">The given <see cref="IGBaseEntry"/></param> /// <param name="column">The given <see cref="IGBaseColumn"/></param>
/// <returns>True if successful, false if not</returns> /// <returns>True if successful, false if not</returns>
bool AddEntry(IGBaseEntry entry); bool AddColumn(IGBaseColumn column);
/// <summary> /// <summary>
/// Remove a given <see cref="IGBaseEntry"/> from this <see cref="IGBaseTable"/> /// Remove a given <see cref="IGBaseColumn"/> from this <see cref="IGBaseTable"/>
/// </summary> /// </summary>
/// <param name="entry">The given <see cref="IGBaseEntry"/></param> /// <param name="column">The given <see cref="IGBaseColumn"/></param>
/// <returns>True if successful, false if not</returns> /// <returns>True if successful, false if not</returns>
bool RemoveEntry(IGBaseEntry entry); bool RemoveColumn(IGBaseColumn column);
} }
} }

@ -1,7 +1,6 @@
using System.Net; using System.Net;
using GBase.Api.Communication; using GBase.Api.Communication;
using GBase.Client; using GBase.Client;
using GBase.Client.Factories;
using GBase.Client.Interfaces; using GBase.Client.Interfaces;
using GBase.Client.Services.Factories; using GBase.Client.Services.Factories;
using Moq; using Moq;
@ -20,11 +19,11 @@ namespace Test.GBase.Client
[Test] [Test]
public void CheckBasicConnectionWithServer() public void CheckBasicConnectionWithServer()
{ {
Assert.Pass(); //Remove this assert if you want to run the test, not possible to with CI Assert.Pass(); //Remove this assert if you want to run the test, not possible with CI
IGBaseClientSettings settings = IGBaseClientSettings settings =
new GBaseClientSettings(ServerProtocol.Http, IPAddress.Parse("127.0.0.1"), 8080, "/GBase", "/GBaseTable", "/GBaseEntry"); new GBaseClientSettings(ServerProtocol.Http, IPAddress.Parse("127.0.0.1"), 8080, "/GBase", "/GBaseTable", "/GBaseColumn");
IGBaseClient client = new GBaseClient(settings, new Mock<IGBaseServiceFactory>().Object, new Mock<IGBaseTableServiceFactory>().Object, new Mock<IGBaseEntryServiceFactory>().Object); IGBaseClient client = new GBaseClient(settings, new Mock<IGBaseServiceFactory>().Object, new Mock<IGBaseTableServiceFactory>().Object, new Mock<IGBaseColumnServiceFactory>().Object);
bool ret = client.GBase.AddTable(); bool ret = client.GBase.AddTable();
Assert.True(ret); Assert.True(ret);

@ -12,7 +12,7 @@ namespace Test.GBase.TestClasses
{ {
private string _name; private string _name;
[GBaseEntry] [GBaseColumn]
public string Name public string Name
{ {
get => _name; get => _name;

Loading…
Cancel
Save