- add type to IGBaseTable

pull/26/head
Simon Gockner 6 years ago
parent 62b86b9557
commit 4249a9aa9d
  1. 11
      GBase/GBaseTable.cs
  2. 8
      GBase/Interfaces/IGBaseTable.cs

@ -23,6 +23,11 @@ namespace GBase
Entries = new List<IGBaseEntry>();
}
/// <summary>
/// The <see cref="System.Type"/> of the class that this <see cref="IGBaseTable"/> represents
/// </summary>
public Type Type { get; private set; }
/// <summary>
/// The name of this <see cref="IGBaseTable"/>
/// </summary>
@ -37,11 +42,13 @@ namespace GBase
/// <summary>
/// Initialize this <see cref="IGBase"/>
/// </summary>
/// <param name="type">The <see cref="System.Type"/> of the class that this <see cref="IGBaseTable"/> represents</param>
/// <param name="name">The name of this <see cref="IGBaseTable"/></param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to cancel the asynchronous operation</param>
/// <returns>True if successful, false if not</returns>
public async Task<bool> Init(string name, CancellationToken cancellationToken)
public async Task<bool> Init(Type type, string name, CancellationToken cancellationToken)
{
Type = type;
Name = name;
//TODO: Init Entries list depending on GBaseEntryAttributes set for this GBaseTable
@ -55,7 +62,7 @@ namespace GBase
/// <returns>A <see cref="ValueTask"/> to await</returns>
public async ValueTask DisposeAsync()
{
throw new System.NotImplementedException();
throw new NotImplementedException();
}
}
}

@ -14,6 +14,11 @@ namespace GBase.Interfaces
/// </summary>
public interface IGBaseTable : IAsyncDisposable
{
/// <summary>
/// The <see cref="System.Type"/> of the class that this <see cref="IGBaseTable"/> represents
/// </summary>
Type Type { get; }
/// <summary>
/// The name of this <see cref="IGBaseTable"/>
/// </summary>
@ -27,9 +32,10 @@ namespace GBase.Interfaces
/// <summary>
/// Initialize this <see cref="IGBase"/>
/// </summary>
/// <param name="type">The <see cref="System.Type"/> of the class that this <see cref="IGBaseTable"/> represents</param>
/// <param name="name">The name of this <see cref="IGBaseTable"/></param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to cancel the asynchronous operation</param>
/// <returns>True if successful, false if not</returns>
Task<bool> Init(string name, CancellationToken cancellationToken);
Task<bool> Init(Type type, string name, CancellationToken cancellationToken);
}
}
Loading…
Cancel
Save