From 0a8c1aa549682555d41be0815406e72d3203412b Mon Sep 17 00:00:00 2001 From: Simon G Date: Tue, 10 Nov 2020 15:41:18 +0100 Subject: [PATCH] #25: use new methods from IGBaseTable --- GBase/GBaseObject.cs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/GBase/GBaseObject.cs b/GBase/GBaseObject.cs index 44af228..99b3c69 100644 --- a/GBase/GBaseObject.cs +++ b/GBase/GBaseObject.cs @@ -3,7 +3,9 @@ // Copyright(c) 2020 SimonG. All Rights Reserved. using System; -using System.Linq; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; using GBase.Api; using GBase.Exceptions; using GBase.Interfaces; @@ -13,9 +15,9 @@ namespace GBase /// /// GBase object that supplies inheriting classes with methods to get data from a /// - public abstract class GBaseObject : IGBaseObject where T : INotifyGBaseEntryChanged + public abstract class GBaseObject : IGBaseObject { - private readonly IGBaseTable _gBaseTable; + private readonly IGBaseTable _gBaseTable; /// /// GBase object that allows conversion from @@ -28,12 +30,14 @@ namespace GBase throw new MissingTableException(); } + protected async Task SetValue(T @this, string propertyName, TProperty value, CancellationToken cancellationToken) => + await _gBaseTable.SetValue(@this, propertyName, value, cancellationToken); - protected TProperty Get() - { - throw new NotImplementedException(); - //_gBaseTable.GetEntry() - } + protected async Task GetValue(T @this, string propertyName, CancellationToken cancellationToken) => + await _gBaseTable.GetValue(@this, propertyName, cancellationToken); + + protected async Task> GetValues(T @this, string propertyName, CancellationToken cancellationToken) => + await _gBaseTable.GetValues(@this, propertyName, cancellationToken); /// /// Initialize this from a given