|
|
|
|
@ -0,0 +1,44 @@ |
|
|
|
|
// Author: Gockner, Simon |
|
|
|
|
// Created: 2020-01-24 |
|
|
|
|
// Copyright(c) 2020 SimonG. All Rights Reserved. |
|
|
|
|
|
|
|
|
|
using System; |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using System.Threading; |
|
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
|
|
namespace GBase.Interfaces |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// The base class of the GBase database |
|
|
|
|
/// </summary> |
|
|
|
|
public interface IGBase : IAsyncDisposable |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// The <see cref="IGBaseTable"/>s of this <see cref="IGBase"/> |
|
|
|
|
/// </summary> |
|
|
|
|
List<IGBaseTable> Tables { get; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// Initialize this <see cref="IGBase"/> |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to cancel the asynchronous operation</param> |
|
|
|
|
/// <returns>True if successful, false if not</returns> |
|
|
|
|
Task<bool> Init(CancellationToken cancellationToken); |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// Add a given <see cref="IGBaseTable"/> to this <see cref="IGBase"/> |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="table">The given <see cref="IGBaseTable"/></param> |
|
|
|
|
/// <returns>True if successful, false if not</returns> |
|
|
|
|
bool AddTable(IGBaseTable table); |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// Removes a given <see cref="IGBaseTable"/> from this <see cref="IGBase"/> |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="table">The given <see cref="IGBaseTable"/></param> |
|
|
|
|
/// <returns>True if successful, false if not</returns> |
|
|
|
|
bool RemoveTable(IGBaseTable table); |
|
|
|
|
} |
|
|
|
|
} |