Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 18 additions & 16 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ indent_size = 4
tab_width = 4

# New line preferences
end_of_line = crlf
insert_final_newline = false
end_of_line = lf
insert_final_newline = true

#### .NET Coding Conventions ####
[*.{cs,vb}]
Expand All @@ -40,10 +40,10 @@ dotnet_style_predefined_type_for_locals_parameters_members = true:silent
dotnet_style_predefined_type_for_member_access = true:silent

# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:silent

# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
Expand Down Expand Up @@ -85,6 +85,8 @@ dotnet_diagnostic.IDE0301.severity = none # simplify collection initialization
dotnet_diagnostic.IDE0053.severity = none # expression body lambda
dotnet_diagnostic.IDE0046.severity = none # simplify if(s) - conditional operator
dotnet_diagnostic.IDE0305.severity = none # [, ...] instead of .ToArray()
dotnet_diagnostic.IDE0130.severity = none # Match namespace name
dotnet_diagnostic.IDE0045.severity = none # Use conditional expression


# namespace declaration
Expand Down Expand Up @@ -140,12 +142,12 @@ csharp_using_directive_placement = outside_namespace:silent
#### C# Formatting Rules ####

# New line preferences
csharp_new_line_before_catch = false
csharp_new_line_before_else = false
csharp_new_line_before_finally = false
csharp_new_line_before_members_in_anonymous_types = false
csharp_new_line_before_members_in_object_initializers = false
csharp_new_line_before_open_brace = none
csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_open_brace = all
csharp_new_line_between_query_expression_clauses = true

# Indentation preferences
Expand Down Expand Up @@ -249,9 +251,9 @@ dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity =
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase

dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.private_static_readonly_fields_should_be_s_camelcase.severity = suggestion
dotnet_naming_rule.private_static_readonly_fields_should_be_s_camelcase.symbols = private_static_readonly_fields
dotnet_naming_rule.private_static_readonly_fields_should_be_s_camelcase.style = s_camelcase

dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums
Expand Down Expand Up @@ -307,7 +309,7 @@ dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, meth
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =

dotnet_naming_symbols.type_parameters.applicable_kinds = namespace
dotnet_naming_symbols.type_parameters.applicable_kinds = type_parameter
dotnet_naming_symbols.type_parameters.applicable_accessibilities = *
dotnet_naming_symbols.type_parameters.required_modifiers =

Expand Down Expand Up @@ -373,4 +375,4 @@ dotnet_naming_style.camelcase.capitalization = camel_case
dotnet_naming_style.s_camelcase.required_prefix = s_
dotnet_naming_style.s_camelcase.required_suffix =
dotnet_naming_style.s_camelcase.word_separator =
dotnet_naming_style.s_camelcase.capitalization = camel_case
dotnet_naming_style.s_camelcase.capitalization = camel_case
9 changes: 7 additions & 2 deletions .github/workflows/unit-tests-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
project: [tests/ArrowDbCore.Tests.Unit/ArrowDbCore.Tests.Unit.csproj, tests/ArrowDbCore.Tests.Unit.Isolated/ArrowDbCore.Tests.Unit.Isolated.csproj]
project:
[
tests/ArrowDbCore.Tests.Unit/ArrowDbCore.Tests.Unit.csproj,
tests/ArrowDbCore.Tests.Unit.Isolated/ArrowDbCore.Tests.Unit.Isolated.csproj,
tests/ArrowDbCore.DependencyInjection.Tests/ArrowDbCore.DependencyInjection.Tests.csproj
]
uses: dusrdev/actions/.github/workflows/reusable-dotnet-test-mtp.yaml@main
with:
platform: ${{ matrix.platform }}
Expand Down Expand Up @@ -43,4 +48,4 @@ jobs:
run: dotnet restore ${{ env.PROJECT }}

- name: Build As Release
run: dotnet build ${{ env.PROJECT }} --configuration Release
run: dotnet build ${{ env.PROJECT }} --configuration Release
9 changes: 7 additions & 2 deletions .github/workflows/unit-tests-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ jobs:
strategy:
fail-fast: false
matrix:
project: [tests/ArrowDbCore.Tests.Unit/ArrowDbCore.Tests.Unit.csproj, tests/ArrowDbCore.Tests.Unit.Isolated/ArrowDbCore.Tests.Unit.Isolated.csproj]
project:
[
tests/ArrowDbCore.Tests.Unit/ArrowDbCore.Tests.Unit.csproj,
tests/ArrowDbCore.Tests.Unit.Isolated/ArrowDbCore.Tests.Unit.Isolated.csproj,
tests/ArrowDbCore.DependencyInjection.Tests/ArrowDbCore.DependencyInjection.Tests.csproj
]
uses: dusrdev/actions/.github/workflows/reusable-dotnet-test-mtp.yaml@main
with:
platform: ubuntu-latest
dotnet-version: 10.0.x
test-project-path: ${{ matrix.project }}
test-project-path: ${{ matrix.project }}
3 changes: 3 additions & 0 deletions ArrowDbCore.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
</Folder>
<Folder Name="/src/">
<Project Path="src/ArrowDbCore/ArrowDbCore.csproj" />
<Project Path="src/ArrowDbCore.DependencyInjection/ArrowDbCore.DependencyInjection.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests/ArrowDbCore.Tests.Analyzers/ArrowDbCore.Tests.Analyzers.csproj" />
<Project Path="tests/ArrowDbCore.Tests.Common/ArrowDbCore.Tests.Common.csproj" />
<Project Path="tests/ArrowDbCore.DependencyInjection.Tests/ArrowDbCore.DependencyInjection.Tests.csproj" />
<Project Path="tests/ArrowDbCore.Tests.Integrity/ArrowDbCore.Tests.Integrity.csproj" />
<Project Path="tests/ArrowDbCore.Tests.Probes.FileOwnership/ArrowDbCore.Tests.Probes.FileOwnership.csproj" />
<Project Path="tests/ArrowDbCore.Tests.Unit.Isolated/ArrowDbCore.Tests.Unit.Isolated.csproj" />
<Project Path="tests/ArrowDbCore.Tests.Unit/ArrowDbCore.Tests.Unit.csproj" />
</Folder>
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog (Sorted by Date in Descending Order)

## 2.0.0.0

- Added optional `CancellationToken` parameters to ArrowDb async APIs, including factory initialization, `SerializeAsync`, `RollbackAsync`, `GetOrAddAsync`, and `BeginTransaction`.
- Updated `GetOrAddAsync` factory delegates to receive the active `CancellationToken`.
- Added `ArrowDb.DependencyInjection` with `IArrowDbProvider`, the public generic `ArrowDbProvider<TSerializer>`, and an optional hosted-service primer for eager startup initialization.
- `ArrowDb.CreateCustom(...)` now has an overload that accepts `disposeSerializer` so serializer ownership can be explicitly assigned; `ArrowDbProvider<TSerializer>` defaults to external serializer ownership and can opt into owning disposal.
- Updated the public `IDbSerializer` contract to receive an optional `CancellationToken` for serialization and deserialization, track `IsDisposed`, and implement both `IDisposable` and `IAsyncDisposable`.
- Transaction scopes can now carry a cancellation token into the outermost implicit serialize during disposal.
- This is a breaking release for callers implementing `IDbSerializer` or calling `GetOrAddAsync` with the old delegate shapes.
- Built-in file-backed serializers now use single-owner writable semantics and fail fast with `ArrowDbOwnershipException` if another process already owns the same database path.
- Removed the previous cross-process writable safety claim from the built-in file serializer path; the persisted file remains a snapshot of the owning process state.
- Built-in file-backed serializers now perform true async file and JSON I/O internally instead of synchronous work behind async signatures.
- This is also a breaking release for custom types inheriting `BaseFileSerializer`, which must implement the new async protected override surface.
- Removed the previous sync-over-async dependency injection guidance from the docs; hosted DI is now documented through `ArrowDb.DependencyInjection` using explicit serializer registration plus `ArrowDbProvider<TSerializer>`.

## 1.6.0.0

- Improve correctness of internal change counting to ensure that changes that happened during serialization are still tracked.
Expand Down
Loading
Loading