From b571340adc94ff4ecb0051a3f297a3c322d4e55e Mon Sep 17 00:00:00 2001 From: Simon G Date: Thu, 30 Jan 2020 13:30:27 +0100 Subject: [PATCH] - strange changes --- .github/workflows/ci.yml | 52 +- .gitignore | 700 +++++++++--------- GBase.sln | 62 +- GBase.sln.DotSettings | 6 +- GBase/Attributes/GBaseEntryAttribute.cs | 40 +- GBase/Attributes/GBaseTableAttribute.cs | 34 +- GBase/GBase.csproj | 48 +- GBase/GBaseEntry.cs | 42 +- GBase/GBaseTable.cs | 134 ++-- GBase/Interfaces/FileHandling/IFileHandler.cs | 46 +- GBase/Interfaces/IGBase.cs | 110 +-- GBase/Interfaces/IGBaseEntry.cs | 26 +- GBase/Interfaces/IGBaseTable.cs | 80 +- GBase/Interfaces/Settings/IGBaseSettings.cs | 26 +- LICENSE.md | 42 +- README.md | 6 +- Test.GBase/Test.GBase.csproj | 50 +- Test.GBase/TestClasses/Foo.cs | 28 +- 18 files changed, 766 insertions(+), 766 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 926aeb7..f6a8ca2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,26 +1,26 @@ -name: CI - -on: [push] - -jobs: - build: - name: Build - runs-on: windows-latest - - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Build - run: dotnet build - - test: - name: Test - needs: build - runs-on: windows-latest - - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Run tests - run: dotnet test - +name: CI + +on: [push] + +jobs: + build: + name: Build + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Build + run: dotnet build + + test: + name: Test + needs: build + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Run tests + run: dotnet test + diff --git a/.gitignore b/.gitignore index dfcfd56..cb43218 100644 --- a/.gitignore +++ b/.gitignore @@ -1,350 +1,350 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/GBase.sln b/GBase.sln index b0bf2b8..c230c24 100644 --- a/GBase.sln +++ b/GBase.sln @@ -1,31 +1,31 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29709.97 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GBase", "GBase\GBase.csproj", "{46E770B6-0422-430E-8C73-47DCF626E7DE}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.GBase", "Test.GBase\Test.GBase.csproj", "{523C0E93-BF2E-4AD5-B07B-42E5E843A3C1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {46E770B6-0422-430E-8C73-47DCF626E7DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {46E770B6-0422-430E-8C73-47DCF626E7DE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {46E770B6-0422-430E-8C73-47DCF626E7DE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {46E770B6-0422-430E-8C73-47DCF626E7DE}.Release|Any CPU.Build.0 = Release|Any CPU - {523C0E93-BF2E-4AD5-B07B-42E5E843A3C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {523C0E93-BF2E-4AD5-B07B-42E5E843A3C1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {523C0E93-BF2E-4AD5-B07B-42E5E843A3C1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {523C0E93-BF2E-4AD5-B07B-42E5E843A3C1}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {A0B562D8-46AE-4232-A016-69EFEFEC00E7} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GBase", "GBase\GBase.csproj", "{46E770B6-0422-430E-8C73-47DCF626E7DE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.GBase", "Test.GBase\Test.GBase.csproj", "{523C0E93-BF2E-4AD5-B07B-42E5E843A3C1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {46E770B6-0422-430E-8C73-47DCF626E7DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {46E770B6-0422-430E-8C73-47DCF626E7DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {46E770B6-0422-430E-8C73-47DCF626E7DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {46E770B6-0422-430E-8C73-47DCF626E7DE}.Release|Any CPU.Build.0 = Release|Any CPU + {523C0E93-BF2E-4AD5-B07B-42E5E843A3C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {523C0E93-BF2E-4AD5-B07B-42E5E843A3C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {523C0E93-BF2E-4AD5-B07B-42E5E843A3C1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {523C0E93-BF2E-4AD5-B07B-42E5E843A3C1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A0B562D8-46AE-4232-A016-69EFEFEC00E7} + EndGlobalSection +EndGlobal diff --git a/GBase.sln.DotSettings b/GBase.sln.DotSettings index 39f371c..5bbddec 100644 --- a/GBase.sln.DotSettings +++ b/GBase.sln.DotSettings @@ -1,4 +1,4 @@ - - Author: $USER_NAME$ -Created: $CREATED_YEAR$-$CREATED_MONTH$-$CREATED_DAY$ + + Author: $USER_NAME$ +Created: $CREATED_YEAR$-$CREATED_MONTH$-$CREATED_DAY$ Copyright(c) $CREATED_YEAR$ SimonG. All Rights Reserved. \ No newline at end of file diff --git a/GBase/Attributes/GBaseEntryAttribute.cs b/GBase/Attributes/GBaseEntryAttribute.cs index 7952e9f..3ad1568 100644 --- a/GBase/Attributes/GBaseEntryAttribute.cs +++ b/GBase/Attributes/GBaseEntryAttribute.cs @@ -1,21 +1,21 @@ -// Author: Gockner, Simon -// Created: 2020-01-24 -// Copyright(c) 2020 SimonG. All Rights Reserved. - -using System; -using GBase.Interfaces; - -namespace GBase.Attributes -{ - /// - /// Tags a property as an - /// - [AttributeUsage(AttributeTargets.Property)] - public class GBaseEntryAttribute : Attribute - { - /// - /// The value of the linked property changed - /// - public event EventHandler ValueChanged; //TODO: Automatically fire this event if the value of the linked property changes and subscribe to it in the correct IGBaseEntry - } +// Author: Gockner, Simon +// Created: 2020-01-24 +// Copyright(c) 2020 SimonG. All Rights Reserved. + +using System; +using GBase.Interfaces; + +namespace GBase.Attributes +{ + /// + /// Tags a property as an + /// + [AttributeUsage(AttributeTargets.Property)] + public class GBaseEntryAttribute : Attribute + { + /// + /// The value of the linked property changed + /// + public event EventHandler ValueChanged; //TODO: Automatically fire this event if the value of the linked property changes and subscribe to it in the correct IGBaseEntry + } } \ No newline at end of file diff --git a/GBase/Attributes/GBaseTableAttribute.cs b/GBase/Attributes/GBaseTableAttribute.cs index df5be30..078e9f6 100644 --- a/GBase/Attributes/GBaseTableAttribute.cs +++ b/GBase/Attributes/GBaseTableAttribute.cs @@ -1,18 +1,18 @@ -// Author: Gockner, Simon -// Created: 2020-01-24 -// Copyright(c) 2020 SimonG. All Rights Reserved. - -using System; -using GBase.Interfaces; - -namespace GBase.Attributes -{ - /// - /// Tags a class as a - /// - [AttributeUsage(AttributeTargets.Class)] - public class GBaseTableAttribute : Attribute //TODO: Decide how to handle enums (as table or their own type) - { - - } +// Author: Gockner, Simon +// Created: 2020-01-24 +// Copyright(c) 2020 SimonG. All Rights Reserved. + +using System; +using GBase.Interfaces; + +namespace GBase.Attributes +{ + /// + /// Tags a class as a + /// + [AttributeUsage(AttributeTargets.Class)] + public class GBaseTableAttribute : Attribute //TODO: Decide how to handle enums (as table or their own type) + { + + } } \ No newline at end of file diff --git a/GBase/GBase.csproj b/GBase/GBase.csproj index 6963052..4f7e411 100644 --- a/GBase/GBase.csproj +++ b/GBase/GBase.csproj @@ -1,24 +1,24 @@ - - - - netstandard2.1 - SimonG - A database based on .net - Copyright(c) 2020 SimonG. All Rights Reserved. - LICENSE.md - https://github.com/SimonG96/GBase - https://github.com/SimonG96/GBase - - - - D:\workspace\Testprojekte\GBase\GBase\GBase.xml - - - - - True - - - - - + + + + netstandard2.1 + SimonG + A database based on .net + Copyright(c) 2020 SimonG. All Rights Reserved. + LICENSE.md + https://github.com/SimonG96/GBase + https://github.com/SimonG96/GBase + + + + D:\workspace\Testprojekte\GBase\GBase\GBase.xml + + + + + True + + + + + diff --git a/GBase/GBaseEntry.cs b/GBase/GBaseEntry.cs index 31b7351..a9eca38 100644 --- a/GBase/GBaseEntry.cs +++ b/GBase/GBaseEntry.cs @@ -1,22 +1,22 @@ -// Author: Gockner, Simon -// Created: 2020-01-27 -// Copyright(c) 2020 SimonG. All Rights Reserved. - -using GBase.Interfaces; - -namespace GBase -{ - /// - /// An entry of a - /// - public class GBaseEntry : IGBaseEntry - { - /// - /// An entry of a - /// - public GBaseEntry() - { - - } - } +// Author: Gockner, Simon +// Created: 2020-01-27 +// Copyright(c) 2020 SimonG. All Rights Reserved. + +using GBase.Interfaces; + +namespace GBase +{ + /// + /// An entry of a + /// + public class GBaseEntry : IGBaseEntry + { + /// + /// An entry of a + /// + public GBaseEntry() + { + + } + } } \ No newline at end of file diff --git a/GBase/GBaseTable.cs b/GBase/GBaseTable.cs index 712dcab..f35fce1 100644 --- a/GBase/GBaseTable.cs +++ b/GBase/GBaseTable.cs @@ -1,68 +1,68 @@ -// 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 -{ - /// - /// A table - /// - public class GBaseTable : IGBaseTable - { - /// - /// A table - /// - public GBaseTable() - { - Entries = new List(); - } - - /// - /// The of the class that this represents - /// - public Type Type { get; private set; } - - /// - /// The name of this - /// - public string Name { get; private set; } - - /// - /// The s of this - /// - public List Entries { get; } - - - /// - /// Initialize this - /// - /// The of the class that this represents - /// The name of this - /// A to cancel the asynchronous operation - /// True if successful, false if not - public async Task Init(Type type, string name, CancellationToken cancellationToken) - { - Type = type; - Name = name; - - //TODO: Init Entries list depending on GBaseEntryAttributes set for this GBaseTable - - return true; - } - - /// - /// The method - /// - /// A to await - public async ValueTask DisposeAsync() - { - throw new NotImplementedException(); - } - } +// 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 +{ + /// + /// A table + /// + public class GBaseTable : IGBaseTable + { + /// + /// A table + /// + public GBaseTable() + { + Entries = new List(); + } + + /// + /// The of the class that this represents + /// + public Type Type { get; private set; } + + /// + /// The name of this + /// + public string Name { get; private set; } + + /// + /// The s of this + /// + public List Entries { get; } + + + /// + /// Initialize this + /// + /// The of the class that this represents + /// The name of this + /// A to cancel the asynchronous operation + /// True if successful, false if not + public async Task Init(Type type, string name, CancellationToken cancellationToken) + { + Type = type; + Name = name; + + //TODO: Init Entries list depending on GBaseEntryAttributes set for this GBaseTable + + return true; + } + + /// + /// The method + /// + /// A to await + public async ValueTask DisposeAsync() + { + throw new NotImplementedException(); + } + } } \ No newline at end of file diff --git a/GBase/Interfaces/FileHandling/IFileHandler.cs b/GBase/Interfaces/FileHandling/IFileHandler.cs index 04ca289..a036b3f 100644 --- a/GBase/Interfaces/FileHandling/IFileHandler.cs +++ b/GBase/Interfaces/FileHandling/IFileHandler.cs @@ -1,24 +1,24 @@ -// Author: Gockner, Simon -// Created: 2020-01-24 -// Copyright(c) 2020 SimonG. All Rights Reserved. - -using System; -using System.Threading; -using System.Threading.Tasks; - -namespace GBase.Interfaces.FileHandling -{ - /// - /// Internal file handler - /// - internal interface IFileHandler : IAsyncDisposable - { - /// - /// Initialize this - /// - /// The path of the database - /// A to cancel the asynchronous operation - /// True if successful, false if not - Task Init(string path, CancellationToken cancellationToken); - } +// Author: Gockner, Simon +// Created: 2020-01-24 +// Copyright(c) 2020 SimonG. All Rights Reserved. + +using System; +using System.Threading; +using System.Threading.Tasks; + +namespace GBase.Interfaces.FileHandling +{ + /// + /// Internal file handler + /// + internal interface IFileHandler : IAsyncDisposable + { + /// + /// Initialize this + /// + /// The path of the database + /// A to cancel the asynchronous operation + /// True if successful, false if not + Task Init(string path, CancellationToken cancellationToken); + } } \ No newline at end of file diff --git a/GBase/Interfaces/IGBase.cs b/GBase/Interfaces/IGBase.cs index c121a92..4bc0578 100644 --- a/GBase/Interfaces/IGBase.cs +++ b/GBase/Interfaces/IGBase.cs @@ -1,56 +1,56 @@ -// 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; -using GBase.Interfaces.Settings; - -namespace GBase.Interfaces -{ - /// - /// The base class of the GBase database - /// - public interface IGBase : IAsyncDisposable - { - /// - /// The name of this - /// - string Name { get; } - - /// - /// The settings of this - /// - IGBaseSettings Settings { get; } - - /// - /// The s of this - /// - List Tables { get; } - - - /// - /// Initialize this - /// - /// The name of this - /// A to cancel the asynchronous operation - /// True if successful, false if not - Task Init(string name, CancellationToken cancellationToken); - - /// - /// Add a given to this - /// - /// The given - /// True if successful, false if not - bool AddTable(IGBaseTable table); - - /// - /// Removes a given from this - /// - /// The given - /// True if successful, false if not - bool RemoveTable(IGBaseTable table); - } +// 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; +using GBase.Interfaces.Settings; + +namespace GBase.Interfaces +{ + /// + /// The base class of the GBase database + /// + public interface IGBase : IAsyncDisposable + { + /// + /// The name of this + /// + string Name { get; } + + /// + /// The settings of this + /// + IGBaseSettings Settings { get; } + + /// + /// The s of this + /// + List Tables { get; } + + + /// + /// Initialize this + /// + /// The name of this + /// A to cancel the asynchronous operation + /// True if successful, false if not + Task Init(string name, CancellationToken cancellationToken); + + /// + /// Add a given to this + /// + /// The given + /// True if successful, false if not + bool AddTable(IGBaseTable table); + + /// + /// Removes a given from this + /// + /// The given + /// True if successful, false if not + bool RemoveTable(IGBaseTable table); + } } \ No newline at end of file diff --git a/GBase/Interfaces/IGBaseEntry.cs b/GBase/Interfaces/IGBaseEntry.cs index a3c9595..d17aceb 100644 --- a/GBase/Interfaces/IGBaseEntry.cs +++ b/GBase/Interfaces/IGBaseEntry.cs @@ -1,14 +1,14 @@ -// Author: Gockner, Simon -// Created: 2020-01-24 -// Copyright(c) 2020 SimonG. All Rights Reserved. - -namespace GBase.Interfaces -{ - /// - /// An entry of a - /// - public interface IGBaseEntry //TODO: Make entry generic (generic type is type of the value of the entry?) - { - - } +// Author: Gockner, Simon +// Created: 2020-01-24 +// Copyright(c) 2020 SimonG. All Rights Reserved. + +namespace GBase.Interfaces +{ + /// + /// An entry of a + /// + public interface IGBaseEntry //TODO: Make entry generic (generic type is type of the value of the entry?) + { + + } } \ No newline at end of file diff --git a/GBase/Interfaces/IGBaseTable.cs b/GBase/Interfaces/IGBaseTable.cs index 7309503..c0bf8e8 100644 --- a/GBase/Interfaces/IGBaseTable.cs +++ b/GBase/Interfaces/IGBaseTable.cs @@ -1,41 +1,41 @@ -// 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 -{ - /// - /// A table - /// - public interface IGBaseTable : IAsyncDisposable - { - /// - /// The of the class that this represents - /// - Type Type { get; } - - /// - /// The name of this - /// - string Name { get; } - - /// - /// The s of this - /// - List Entries { get; } - - /// - /// Initialize this - /// - /// The of the class that this represents - /// The name of this - /// A to cancel the asynchronous operation - /// True if successful, false if not - Task Init(Type type, string name, CancellationToken cancellationToken); - } +// 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 +{ + /// + /// A table + /// + public interface IGBaseTable : IAsyncDisposable + { + /// + /// The of the class that this represents + /// + Type Type { get; } + + /// + /// The name of this + /// + string Name { get; } + + /// + /// The s of this + /// + List Entries { get; } + + /// + /// Initialize this + /// + /// The of the class that this represents + /// The name of this + /// A to cancel the asynchronous operation + /// True if successful, false if not + Task Init(Type type, string name, CancellationToken cancellationToken); + } } \ No newline at end of file diff --git a/GBase/Interfaces/Settings/IGBaseSettings.cs b/GBase/Interfaces/Settings/IGBaseSettings.cs index 3cb2d9d..b191cfb 100644 --- a/GBase/Interfaces/Settings/IGBaseSettings.cs +++ b/GBase/Interfaces/Settings/IGBaseSettings.cs @@ -1,14 +1,14 @@ -// Author: Gockner, Simon -// Created: 2020-01-24 -// Copyright(c) 2020 SimonG. All Rights Reserved. - -namespace GBase.Interfaces.Settings -{ - /// - /// Settings of a instance - /// - public interface IGBaseSettings - { - - } +// Author: Gockner, Simon +// Created: 2020-01-24 +// Copyright(c) 2020 SimonG. All Rights Reserved. + +namespace GBase.Interfaces.Settings +{ + /// + /// Settings of a instance + /// + public interface IGBaseSettings + { + + } } \ No newline at end of file diff --git a/LICENSE.md b/LICENSE.md index 9cf27dd..dbf63b4 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2020 Simon G. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2020 Simon G. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index f7f1217..d053d7a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# GBase - -A database based on .net +# GBase + +A database based on .net diff --git a/Test.GBase/Test.GBase.csproj b/Test.GBase/Test.GBase.csproj index a366ef6..8b1afee 100644 --- a/Test.GBase/Test.GBase.csproj +++ b/Test.GBase/Test.GBase.csproj @@ -1,25 +1,25 @@ - - - - netcoreapp3.1 - - false - - SimonG - - SimonG - - Copyright(c) 2020 SimonG. All Rights Reserved. - - - - - - - - - - - - - + + + + netcoreapp3.1 + + false + + SimonG + + SimonG + + Copyright(c) 2020 SimonG. All Rights Reserved. + + + + + + + + + + + + + diff --git a/Test.GBase/TestClasses/Foo.cs b/Test.GBase/TestClasses/Foo.cs index 4ff2362..e605a0c 100644 --- a/Test.GBase/TestClasses/Foo.cs +++ b/Test.GBase/TestClasses/Foo.cs @@ -1,15 +1,15 @@ -// Author: Gockner, Simon -// Created: 2020-01-27 -// Copyright(c) 2020 SimonG. All Rights Reserved. - -using GBase.Attributes; - -namespace Test.GBase.TestClasses -{ - [GBaseTable] - public class Foo - { - [GBaseEntry] - public string Name { get; set; } - } +// Author: Gockner, Simon +// Created: 2020-01-27 +// Copyright(c) 2020 SimonG. All Rights Reserved. + +using GBase.Attributes; + +namespace Test.GBase.TestClasses +{ + [GBaseTable] + public class Foo + { + [GBaseEntry] + public string Name { get; set; } + } } \ No newline at end of file