You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.2 KiB
68 lines
2.2 KiB
// 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 <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>
|
|
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="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(Type type, string name, CancellationToken cancellationToken)
|
|
{
|
|
Type = type;
|
|
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 NotImplementedException();
|
|
}
|
|
}
|
|
} |