- strange changes

pull/26/head
Simon G 6 years ago
parent 4249a9aa9d
commit b571340adc
  1. 52
      .github/workflows/ci.yml
  2. 700
      .gitignore
  3. 62
      GBase.sln
  4. 6
      GBase.sln.DotSettings
  5. 40
      GBase/Attributes/GBaseEntryAttribute.cs
  6. 34
      GBase/Attributes/GBaseTableAttribute.cs
  7. 48
      GBase/GBase.csproj
  8. 42
      GBase/GBaseEntry.cs
  9. 134
      GBase/GBaseTable.cs
  10. 46
      GBase/Interfaces/FileHandling/IFileHandler.cs
  11. 110
      GBase/Interfaces/IGBase.cs
  12. 26
      GBase/Interfaces/IGBaseEntry.cs
  13. 80
      GBase/Interfaces/IGBaseTable.cs
  14. 26
      GBase/Interfaces/Settings/IGBaseSettings.cs
  15. 42
      LICENSE.md
  16. 6
      README.md
  17. 50
      Test.GBase/Test.GBase.csproj
  18. 28
      Test.GBase/TestClasses/Foo.cs

@ -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

700
.gitignore vendored

@ -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/

@ -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

@ -1,4 +1,4 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue">Author: $USER_NAME$&#xD;
Created: $CREATED_YEAR$-$CREATED_MONTH$-$CREATED_DAY$&#xD;
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue">Author: $USER_NAME$&#xD;
Created: $CREATED_YEAR$-$CREATED_MONTH$-$CREATED_DAY$&#xD;
Copyright(c) $CREATED_YEAR$ SimonG. All Rights Reserved.</s:String></wpf:ResourceDictionary>

@ -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
{
/// <summary>
/// Tags a property as an <see cref="IGBaseEntry"/>
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class GBaseEntryAttribute : Attribute
{
/// <summary>
/// The value of the linked property changed
/// </summary>
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
{
/// <summary>
/// Tags a property as an <see cref="IGBaseEntry"/>
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class GBaseEntryAttribute : Attribute
{
/// <summary>
/// The value of the linked property changed
/// </summary>
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
}
}

@ -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
{
/// <summary>
/// Tags a class as a <see cref="IGBaseTable"/>
/// </summary>
[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
{
/// <summary>
/// Tags a class as a <see cref="IGBaseTable"/>
/// </summary>
[AttributeUsage(AttributeTargets.Class)]
public class GBaseTableAttribute : Attribute //TODO: Decide how to handle enums (as table or their own type)
{
}
}

@ -1,24 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Authors>SimonG</Authors>
<Description>A database based on .net</Description>
<Copyright>Copyright(c) 2020 SimonG. All Rights Reserved.</Copyright>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageProjectUrl>https://github.com/SimonG96/GBase</PackageProjectUrl>
<RepositoryUrl>https://github.com/SimonG96/GBase</RepositoryUrl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>D:\workspace\Testprojekte\GBase\GBase\GBase.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<None Include="..\LICENSE.md">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Authors>SimonG</Authors>
<Description>A database based on .net</Description>
<Copyright>Copyright(c) 2020 SimonG. All Rights Reserved.</Copyright>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageProjectUrl>https://github.com/SimonG96/GBase</PackageProjectUrl>
<RepositoryUrl>https://github.com/SimonG96/GBase</RepositoryUrl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>D:\workspace\Testprojekte\GBase\GBase\GBase.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<None Include="..\LICENSE.md">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
</Project>

@ -1,22 +1,22 @@
// Author: Gockner, Simon
// Created: 2020-01-27
// Copyright(c) 2020 SimonG. All Rights Reserved.
using GBase.Interfaces;
namespace GBase
{
/// <summary>
/// An entry of a <see cref="IGBaseTable"/>
/// </summary>
public class GBaseEntry : IGBaseEntry
{
/// <summary>
/// An entry of a <see cref="IGBaseTable"/>
/// </summary>
public GBaseEntry()
{
}
}
// Author: Gockner, Simon
// Created: 2020-01-27
// Copyright(c) 2020 SimonG. All Rights Reserved.
using GBase.Interfaces;
namespace GBase
{
/// <summary>
/// An entry of a <see cref="IGBaseTable"/>
/// </summary>
public class GBaseEntry : IGBaseEntry
{
/// <summary>
/// An entry of a <see cref="IGBaseTable"/>
/// </summary>
public GBaseEntry()
{
}
}
}

@ -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
{
/// <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();
}
}
// 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();
}
}
}

@ -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
{
/// <summary>
/// Internal file handler
/// </summary>
internal interface IFileHandler : IAsyncDisposable
{
/// <summary>
/// Initialize this <see cref="IFileHandler"/>
/// </summary>
/// <param name="path">The path of the database</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to cancel the asynchronous operation</param>
/// <returns>True if successful, false if not</returns>
Task<bool> 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
{
/// <summary>
/// Internal file handler
/// </summary>
internal interface IFileHandler : IAsyncDisposable
{
/// <summary>
/// Initialize this <see cref="IFileHandler"/>
/// </summary>
/// <param name="path">The path of the database</param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to cancel the asynchronous operation</param>
/// <returns>True if successful, false if not</returns>
Task<bool> Init(string path, CancellationToken cancellationToken);
}
}

@ -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
{
/// <summary>
/// The base class of the GBase database
/// </summary>
public interface IGBase : IAsyncDisposable
{
/// <summary>
/// The name of this <see cref="IGBase"/>
/// </summary>
string Name { get; }
/// <summary>
/// The settings of this <see cref="IGBase"/>
/// </summary>
IGBaseSettings Settings { get; }
/// <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="name">The name of this <see cref="IGBase"/></param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to cancel the asynchronous operation</param>
/// <returns>True if successful, false if not</returns>
Task<bool> Init(string name, 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);
}
// 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
{
/// <summary>
/// The base class of the GBase database
/// </summary>
public interface IGBase : IAsyncDisposable
{
/// <summary>
/// The name of this <see cref="IGBase"/>
/// </summary>
string Name { get; }
/// <summary>
/// The settings of this <see cref="IGBase"/>
/// </summary>
IGBaseSettings Settings { get; }
/// <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="name">The name of this <see cref="IGBase"/></param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to cancel the asynchronous operation</param>
/// <returns>True if successful, false if not</returns>
Task<bool> Init(string name, 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);
}
}

@ -1,14 +1,14 @@
// Author: Gockner, Simon
// Created: 2020-01-24
// Copyright(c) 2020 SimonG. All Rights Reserved.
namespace GBase.Interfaces
{
/// <summary>
/// An entry of a <see cref="IGBaseTable"/>
/// </summary>
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
{
/// <summary>
/// An entry of a <see cref="IGBaseTable"/>
/// </summary>
public interface IGBaseEntry //TODO: Make entry generic (generic type is type of the value of the entry?)
{
}
}

@ -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
{
/// <summary>
/// A <see cref="IGBase"/> table
/// </summary>
public interface IGBaseTable : IAsyncDisposable
{
/// <summary>
/// The <see cref="System.Type"/> of the class that this <see cref="IGBaseTable"/> represents
/// </summary>
Type Type { get; }
/// <summary>
/// The name of this <see cref="IGBaseTable"/>
/// </summary>
string Name { get; }
/// <summary>
/// The <see cref="IGBaseEntry"/>s of this <see cref="IGBaseTable"/>
/// </summary>
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>
Task<bool> 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
{
/// <summary>
/// A <see cref="IGBase"/> table
/// </summary>
public interface IGBaseTable : IAsyncDisposable
{
/// <summary>
/// The <see cref="System.Type"/> of the class that this <see cref="IGBaseTable"/> represents
/// </summary>
Type Type { get; }
/// <summary>
/// The name of this <see cref="IGBaseTable"/>
/// </summary>
string Name { get; }
/// <summary>
/// The <see cref="IGBaseEntry"/>s of this <see cref="IGBaseTable"/>
/// </summary>
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>
Task<bool> Init(Type type, string name, CancellationToken cancellationToken);
}
}

@ -1,14 +1,14 @@
// Author: Gockner, Simon
// Created: 2020-01-24
// Copyright(c) 2020 SimonG. All Rights Reserved.
namespace GBase.Interfaces.Settings
{
/// <summary>
/// Settings of a <see cref="IGBase"/> instance
/// </summary>
public interface IGBaseSettings
{
}
// Author: Gockner, Simon
// Created: 2020-01-24
// Copyright(c) 2020 SimonG. All Rights Reserved.
namespace GBase.Interfaces.Settings
{
/// <summary>
/// Settings of a <see cref="IGBase"/> instance
/// </summary>
public interface IGBaseSettings
{
}
}

@ -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.

@ -1,3 +1,3 @@
# GBase
A database based on .net
# GBase
A database based on .net

@ -1,25 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<Authors>SimonG</Authors>
<Company>SimonG</Company>
<Copyright>Copyright(c) 2020 SimonG. All Rights Reserved.</Copyright>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GBase\GBase.csproj" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<Authors>SimonG</Authors>
<Company>SimonG</Company>
<Copyright>Copyright(c) 2020 SimonG. All Rights Reserved.</Copyright>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GBase\GBase.csproj" />
</ItemGroup>
</Project>

@ -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; }
}
}
Loading…
Cancel
Save