Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
25328db
Update projects to .net8.0 and add KurrentDB
JoshPattie May 27, 2025
67af5d6
Target .net48 and latest lang version
JoshPattie May 27, 2025
8e1c6ac
Added codestyles and apply formatting
JoshPattie May 27, 2025
402f0d6
Renamed to current Kurrent and replaced CorshamScience with PharmaxoS…
JoshPattie May 27, 2025
29e2fd0
Renamed aggregate repository
JoshPattie May 27, 2025
0746cf3
More reference updated from EventStore to Kurrent
JoshPattie May 27, 2025
3afba65
Add dotnet format to build cmd
JoshPattie May 27, 2025
bb439b0
Updated test file name
JoshPattie May 27, 2025
1cdf055
Added back ghcr.io to check if reason for failing tests
JoshPattie May 27, 2025
790dd2f
Basic readme update + dotnet restore solution
JoshPattie May 27, 2025
7bb3514
Revert change to expectedVersion logic
JoshPattie May 27, 2025
6b991d4
target net481
JoshPattie May 28, 2025
12819a7
Try to fail build
JoshPattie May 28, 2025
1e8fb2c
formatting
JoshPattie May 28, 2025
3ab34e9
Optional flag to disable tests
JoshPattie May 28, 2025
b330b17
Update src/AggregateRepository.Kurrent/AggregateRepository.Kurrent.cs…
JoshPattie May 28, 2025
d0980d3
Renamed Kurrent to KurrentDB
JoshPattie May 28, 2025
3a96885
Fixed missing rename in build script + removed unused script
JoshPattie May 28, 2025
4bcdd13
Updated references to the repository
JoshPattie May 28, 2025
0c1eeb0
Updated missing reference in License
JoshPattie May 28, 2025
5df83c8
Updated tests to target 481 + ES now runs as developer mode
JoshPattie Jun 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .editorconfig

This file was deleted.

4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Copyright (c) 2013, Cognisant Research
Copyright (c) 2025, Pharmaxo Scientific
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Cognisant Research nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
Neither the name of Pharmaxo Scientific nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cr-aggregaterepository
Pharmaxo Scientific Aggregate Repository
======================

Common library for saving and rebuilding of objects from event streams - Includes JOliver, GetEventStore and InMemory Implementations
Common library for saving and rebuilding of objects from Kurrent DB event streams using the KurrentDBClient.

[![cognisant-libs MyGet Build Status](https://www.myget.org/BuildSource/Badge/cognisant-libs?identifier=a31a1e31-93c4-4e75-8491-957e0983949f)](https://www.myget.org/)
[Pharmaxo Scientific Aggregate Repository](https://www.nuget.org/packages/PharmaxoScientific.AggregateRepository.KurrentDB)
23 changes: 16 additions & 7 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
@echo off

SET VERSION=0.0.0
IF NOT [%1]==[] (set VERSION=%1)
IF NOT [%1]==[] (SET VERSION=%1)

SET TAG=0.0.0
IF NOT [%2]==[] (set TAG=%2)
IF NOT [%2]==[] (SET TAG=%2)
SET TAG=%TAG:tags/=%

curl -o nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
.\\nuget.exe restore .\\src\\AggregateRepository.EventStore.Tests\\AggregateRepository.EventStore.Tests.csproj -PackagesDirectory .\\src\\packages -Verbosity detailed
SET RUNTESTS=true
IF NOT [%3]==[] (SET RUNTESTS=%3)

dotnet test .\src\AggregateRepository.EventStore.Tests\AggregateRepository.EventStore.Tests.csproj
if %errorlevel% neq 0 exit /b %errorlevel%
dotnet restore .\src\AggregateRepository.KurrentDB.sln -PackagesDirectory .\src\packages -Verbosity detailed

dotnet pack .\src\AggregateRepository.EventStore\AggregateRepository.EventStore.csproj -o .\dist -p:Version="%VERSION%" -p:PackageVersion="%VERSION%" -p:Tag="%TAG%" -c Release
dotnet format .\src\AggregateRepository.KurrentDB.sln --severity warn --verify-no-changes -v diag
IF %errorlevel% neq 0 EXIT /B %errorlevel%

IF /I "%RUNTESTS%"=="true" (
dotnet test .\src\AggregateRepository.KurrentDB.Tests\AggregateRepository.KurrentDB.Tests.csproj
IF %errorlevel% neq 0 EXIT /B %errorlevel%
) ELSE (
ECHO Skipping tests because RUNTESTS is not set to "true".
)

dotnet pack .\src\AggregateRepository.KurrentDB\AggregateRepository.KurrentDB.csproj -o .\dist -p:Version="%VERSION%" -p:PackageVersion="%VERSION%" -p:Tag="%TAG%" -c Release
13 changes: 0 additions & 13 deletions build.sh

This file was deleted.

212 changes: 212 additions & 0 deletions src/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
# editorconfig.org

# Pharmaxo Scientific .net Codestyles editorconfig v1.0

# top-most EditorConfig file
root = true

# Default settings:
# A newline ending every file
# Use 4 spaces as indentation
[*]
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[project.json]
indent_size = 2

# C# and Visual Basic files
[*.{cs,vb}]
charset = utf-8-bom

# Analyzers
dotnet_analyzer_diagnostic.category-Security.severity = warning
dotnet_code_quality.ca1802.api_surface = private, internal

# Miscellaneous style rules
dotnet_sort_system_directives_first = true
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
dotnet_style_predefined_type_for_member_access = true:warning

# avoid this. unless absolutely necessary
dotnet_style_qualification_for_field = false:warning
dotnet_style_qualification_for_property = false:warning
dotnet_style_qualification_for_method = false:warning
dotnet_style_qualification_for_event = false:warning

# name all constant fields using PascalCase
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.required_modifiers = const
dotnet_naming_style.pascal_case_style.capitalization = pascal_case

# static fields should have _ prefix
dotnet_naming_rule.static_fields_should_have_prefix.severity = warning
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
dotnet_naming_style.static_prefix_style.required_prefix = _
dotnet_naming_style.static_prefix_style.capitalization = camel_case

# internal and private fields should be _camelCase
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case

# Code quality
dotnet_style_readonly_field = true:warning
dotnet_code_quality_unused_parameters = non_public:warning

# Expression-level preferences
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
dotnet_style_prefer_conditional_expression_over_return = true:suggestion

# CA2208: Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = error

# C# files
[*.cs]
# New line preferences
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_between_query_expression_clauses = true

# Experimental New line rules

csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:warning
dotnet_style_allow_multiple_blank_lines_experimental = false:warning

# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_switch_labels = true
csharp_indent_labels = one_less_than_current

# Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning

# Code style defaults
csharp_using_directive_placement = outside_namespace:warning
csharp_prefer_braces = true:warning
csharp_preserve_single_line_blocks = true:warning
csharp_preserve_single_line_statements = false:warning
csharp_prefer_static_local_function = true:suggestion
csharp_prefer_simple_using_statement = false:none
csharp_style_prefer_switch_expression = true:suggestion

# Expression-bodied members
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
csharp_style_expression_bodied_operators = when_on_single_line:suggestion
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
csharp_style_expression_bodied_indexers = when_on_single_line:suggestion
csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
csharp_style_expression_bodied_lambdas = when_on_single_line:suggestion
csharp_style_expression_bodied_local_functions = when_on_single_line:suggestion

# Pattern matching
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion

# Expression-level preferences
csharp_prefer_simple_default_expression = true:suggestion

# Null checking preferences
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion

# Other features
csharp_style_prefer_index_operator = false:none
csharp_style_prefer_range_operator = false:none
csharp_style_pattern_local_over_anonymous_function = false:none

# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false

# Namespace preference
csharp_style_namespace_declarations = file_scoped:warning
dotnet_style_namespace_match_folder = true:suggestion

# Types: Will suggest var in all instances, but does not enforce it.
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = false:none
csharp_style_var_elsewhere = true:suggestion

# License header (second line required to set severity level for this)
file_header_template = Copyright (c) Pharmaxo. All rights reserved.
dotnet_diagnostic.IDE0073.severity = warning

# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
indent_size = 2

# Xml build files
[*.builds]
indent_size = 2

# Xml files
[*.{xml,stylecop,resx,ruleset}]
indent_size = 2

# Xml config files
[*.{props,targets,config,nuspec}]
indent_size = 2

# Shell scripts
[*.sh]
end_of_line = lf

[*.{cmd, bat}]
end_of_line = crlf

# Markdown files
[*.md]
# Double trailing spaces can be used for BR tags, and other instances are enforced by Markdownlint
trim_trailing_whitespace = false
Loading