|
|
|
|
@ -0,0 +1,61 @@ |
|
|
|
|
// Author: Gockner, Simon |
|
|
|
|
// Created: 2020-01-27 |
|
|
|
|
// Copyright(c) 2020 SimonG. All Rights Reserved. |
|
|
|
|
|
|
|
|
|
using System; |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using System.Threading; |
|
|
|
|
using System.Threading.Tasks; |
|
|
|
|
using GBase.Interfaces; |
|
|
|
|
|
|
|
|
|
namespace GBase |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// A <see cref="IGBase"/> table |
|
|
|
|
/// </summary> |
|
|
|
|
public class GBaseTable : IGBaseTable |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// A <see cref="IGBase"/> table |
|
|
|
|
/// </summary> |
|
|
|
|
public GBaseTable() |
|
|
|
|
{ |
|
|
|
|
Entries = new List<IGBaseEntry>(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// The name of this <see cref="IGBaseTable"/> |
|
|
|
|
/// </summary> |
|
|
|
|
public string Name { get; private set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// The <see cref="IGBaseEntry"/>s of this <see cref="IGBaseTable"/> |
|
|
|
|
/// </summary> |
|
|
|
|
public List<IGBaseEntry> Entries { get; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// Initialize this <see cref="IGBase"/> |
|
|
|
|
/// </summary> |
|
|
|
|
/// <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) |
|
|
|
|
{ |
|
|
|
|
Name = name; |
|
|
|
|
|
|
|
|
|
//TODO: Init Entries list depending on GBaseEntryAttributes set for this GBaseTable |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// The <see cref="IAsyncDisposable.DisposeAsync"/> method |
|
|
|
|
/// </summary> |
|
|
|
|
/// <returns>A <see cref="ValueTask"/> to await</returns> |
|
|
|
|
public async ValueTask DisposeAsync() |
|
|
|
|
{ |
|
|
|
|
throw new System.NotImplementedException(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |