diff --git a/GBase/GBaseObject.cs b/GBase/GBaseObject.cs new file mode 100644 index 0000000..5ff272e --- /dev/null +++ b/GBase/GBaseObject.cs @@ -0,0 +1,44 @@ +// Author: Gockner, Simon +// Created: 2020-09-18 +// Copyright(c) 2020 SimonG. All Rights Reserved. + +using System; +using System.Linq; +using GBase.Api; +using GBase.Exceptions; +using GBase.Interfaces; + +namespace GBase +{ + /// + /// GBase object that supplies inheriting classes with methods to get data from a + /// + public abstract class GBaseObject : IGBaseObject where T : INotifyGBaseEntryChanged + { + private readonly IGBaseTable _gBaseTable; + + /// + /// GBase object that allows conversion from + /// + /// No table for is existing + protected GBaseObject(IGBase gBase) + { + _gBaseTable = gBase.GetTable(); + if (_gBaseTable == null) + throw new MissingTableException(typeof(T)); + } + + + protected TProperty Get() + { + throw new NotImplementedException(); + //_gBaseTable.GetEntry() + } + + /// + /// Initialize this from a given + /// + /// The given + public abstract void InitializeFromString(string @string); + } +} \ No newline at end of file