- add class and function comments

- add documentation xml
pull/26/head
Simon Gockner 6 years ago
parent 6f387189e2
commit 037dbfde9c
  1. 26
      GBase.Api/Communication/ICommunicationSettings.cs
  2. 29
      GBase.Api/Communication/ServerProtocol.cs
  3. 4
      GBase.Api/GBase.Api.csproj
  4. 128
      GBase.Api/GBase.Api.xml
  5. 6
      GBase.Api/Services/IGBaseEntryService.cs
  6. 11
      GBase.Api/Services/IGBaseService.cs
  7. 16
      GBase.Api/Services/IGBaseTableService.cs

@ -6,13 +6,39 @@ using System.Net;
namespace GBase.Api.Communication
{
/// <summary>
/// Settings for a client-server communication
/// </summary>
public interface ICommunicationSettings
{
/// <summary>
/// The used <see cref="ServerProtocol"/>
/// </summary>
ServerProtocol Protocol { get; }
/// <summary>
/// The used <see cref="IpAddress"/>
/// </summary>
IPAddress IpAddress { get; }
/// <summary>
/// The used port
/// </summary>
int Port { get; }
/// <summary>
/// The used endpoint for the GBase
/// </summary>
string GBaseEndpoint { get; }
/// <summary>
/// The used endpoint for the GBaseTable
/// </summary>
string GBaseTableEndpoint { get; }
/// <summary>
/// The used endpoint for the GBaseEntry
/// </summary>
string GBaseEntryEndpoint { get; }
}
}

@ -6,15 +6,38 @@ using System;
namespace GBase.Api.Communication
{
/// <summary>
/// The protocol used for the connection between client and server
/// </summary>
public enum ServerProtocol //TODO: Decide which protocols should be usable
{
/// <summary>
/// Http connection
/// </summary>
Http,
/// <summary>
/// Https connection
/// </summary>
Https,
/// <summary>
/// net.tcp connection
/// </summary>
Tcp
}
/// <summary>
/// Extension methods for the <see cref="ServerProtocol"/> enum
/// </summary>
public static class ServerProtocolExtensions
{
/// <summary>
/// Get a protocol string for a <see cref="ServerProtocol"/>
/// </summary>
/// <param name="protocol">The <see cref="ServerProtocol"/></param>
/// <returns>A protocol string for the <see cref="ServerProtocol"/></returns>
/// <exception cref="ArgumentOutOfRangeException">Invalid protocol passed.</exception>
public static string GetProtocolString(this ServerProtocol protocol)
{
switch (protocol)
@ -30,6 +53,12 @@ namespace GBase.Api.Communication
}
}
/// <summary>
/// Get the <see cref="ServerProtocol"/> for a given <see cref="string"/>
/// </summary>
/// <param name="string">The given <see cref="string"/></param>
/// <returns>The <see cref="ServerProtocol"/> for the given <see cref="string"/></returns>
/// <exception cref="ArgumentOutOfRangeException">Invalid string passed.</exception>
public static ServerProtocol GetServerProtocolFromString(string @string)
{
if (@string.Equals(@"http://") || @string.Equals("http"))

@ -4,6 +4,10 @@
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>D:\workspace\Testprojekte\GBase\GBase.Api\GBase.Api.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Primitives" Version="4.7.0" />
</ItemGroup>

@ -0,0 +1,128 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>GBase.Api</name>
</assembly>
<members>
<member name="T:GBase.Api.Communication.ICommunicationSettings">
<summary>
Settings for a client-server communication
</summary>
</member>
<member name="P:GBase.Api.Communication.ICommunicationSettings.Protocol">
<summary>
The used <see cref="T:GBase.Api.Communication.ServerProtocol"/>
</summary>
</member>
<member name="P:GBase.Api.Communication.ICommunicationSettings.IpAddress">
<summary>
The used <see cref="P:GBase.Api.Communication.ICommunicationSettings.IpAddress"/>
</summary>
</member>
<member name="P:GBase.Api.Communication.ICommunicationSettings.Port">
<summary>
The used port
</summary>
</member>
<member name="P:GBase.Api.Communication.ICommunicationSettings.GBaseEndpoint">
<summary>
The used endpoint for the GBase
</summary>
</member>
<member name="P:GBase.Api.Communication.ICommunicationSettings.GBaseTableEndpoint">
<summary>
The used endpoint for the GBaseTable
</summary>
</member>
<member name="P:GBase.Api.Communication.ICommunicationSettings.GBaseEntryEndpoint">
<summary>
The used endpoint for the GBaseEntry
</summary>
</member>
<member name="T:GBase.Api.Communication.ServerProtocol">
<summary>
The protocol used for the connection between client and server
</summary>
</member>
<member name="F:GBase.Api.Communication.ServerProtocol.Http">
<summary>
Http connection
</summary>
</member>
<member name="F:GBase.Api.Communication.ServerProtocol.Https">
<summary>
Https connection
</summary>
</member>
<member name="F:GBase.Api.Communication.ServerProtocol.Tcp">
<summary>
net.tcp connection
</summary>
</member>
<member name="T:GBase.Api.Communication.ServerProtocolExtensions">
<summary>
Extension methods for the <see cref="T:GBase.Api.Communication.ServerProtocol"/> enum
</summary>
</member>
<member name="M:GBase.Api.Communication.ServerProtocolExtensions.GetProtocolString(GBase.Api.Communication.ServerProtocol)">
<summary>
Get a protocol string for a <see cref="T:GBase.Api.Communication.ServerProtocol"/>
</summary>
<param name="protocol">The <see cref="T:GBase.Api.Communication.ServerProtocol"/></param>
<returns>A protocol string for the <see cref="T:GBase.Api.Communication.ServerProtocol"/></returns>
<exception cref="T:System.ArgumentOutOfRangeException">Invalid protocol passed.</exception>
</member>
<member name="M:GBase.Api.Communication.ServerProtocolExtensions.GetServerProtocolFromString(System.String)">
<summary>
Get the <see cref="T:GBase.Api.Communication.ServerProtocol"/> for a given <see cref="T:System.String"/>
</summary>
<param name="string">The given <see cref="T:System.String"/></param>
<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>
</member>
<member name="T:GBase.Api.Services.IGBaseEntryService">
<summary>
ServiceContract for the GBaseEntry
</summary>
</member>
<member name="M:GBase.Api.Services.IGBaseEntryService.Dummy">
<summary>
Dummy OperationContract
</summary>
</member>
<member name="T:GBase.Api.Services.IGBaseService">
<summary>
ServiceContract for the GBase
</summary>
</member>
<member name="M:GBase.Api.Services.IGBaseService.AddTable">
<summary>
Add a table to the GBase
</summary>
<returns>True if successful, false if not</returns>
</member>
<member name="M:GBase.Api.Services.IGBaseService.RemoveTable">
<summary>
Remove a table from the GBase
</summary>
<returns>True if successful, false if not</returns>
</member>
<member name="T:GBase.Api.Services.IGBaseTableService">
<summary>
ServiceContract for the GBaseTable
</summary>
</member>
<member name="M:GBase.Api.Services.IGBaseTableService.AddEntry">
<summary>
Add an entry to the GBaseTable
</summary>
<returns>True if successful, false if not</returns>
</member>
<member name="M:GBase.Api.Services.IGBaseTableService.RemoveEntry">
<summary>
Remove an entry from the GBaseTable
</summary>
<returns>True if successful, false if not</returns>
</member>
</members>
</doc>

@ -7,9 +7,15 @@ using System.ServiceModel;
namespace GBase.Api.Services
{
/// <summary>
/// ServiceContract for the GBaseEntry
/// </summary>
[ServiceContract]
public interface IGBaseEntryService : IAsyncDisposable //TODO: Add OperationContracts for all operations this service has to do
{
/// <summary>
/// Dummy OperationContract
/// </summary>
[OperationContract]
void Dummy();
}

@ -7,12 +7,23 @@ using System.ServiceModel;
namespace GBase.Api.Services
{
/// <summary>
/// ServiceContract for the GBase
/// </summary>
[ServiceContract]
public interface IGBaseService : IAsyncDisposable //TODO: Add OperationContracts for all operations this service has to do
{
/// <summary>
/// Add a table to the GBase
/// </summary>
/// <returns>True if successful, false if not</returns>
[OperationContract]
bool AddTable();
/// <summary>
/// Remove a table from the GBase
/// </summary>
/// <returns>True if successful, false if not</returns>
[OperationContract]
bool RemoveTable();
}

@ -7,10 +7,24 @@ using System.ServiceModel;
namespace GBase.Api.Services
{
/// <summary>
/// ServiceContract for the GBaseTable
/// </summary>
[ServiceContract]
public interface IGBaseTableService : IAsyncDisposable //TODO: Add OperationContracts for all operations this service has to do
{
/// <summary>
/// Add an entry to the GBaseTable
/// </summary>
/// <returns>True if successful, false if not</returns>
[OperationContract]
void Dummy();
bool AddEntry();
/// <summary>
/// Remove an entry from the GBaseTable
/// </summary>
/// <returns>True if successful, false if not</returns>
[OperationContract]
bool RemoveEntry();
}
}
Loading…
Cancel
Save