diff --git a/.github/actions/setup-dotnets/action.yml b/.github/actions/setup-dotnets/action.yml
index 442005972..b936b5f22 100644
--- a/.github/actions/setup-dotnets/action.yml
+++ b/.github/actions/setup-dotnets/action.yml
@@ -11,6 +11,12 @@ runs:
using: "composite"
steps:
+ - name: Setup .NET 10 (if needed)
+ if: ${{ contains(inputs.target_framework, '10.0') }}
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: '10.0.x'
+
- name: Setup .NET 9 (if needed)
if: ${{ contains(inputs.target_framework, '9.0') }}
uses: actions/setup-dotnet@v4
diff --git a/.github/workflows/auto-databaseless-tests.yml b/.github/workflows/auto-databaseless-tests.yml
index 86bb73a78..af3302dc8 100644
--- a/.github/workflows/auto-databaseless-tests.yml
+++ b/.github/workflows/auto-databaseless-tests.yml
@@ -4,8 +4,8 @@ run-name: Core tests triggered by '${{ github.event_name }}'. Run No ${{ github.
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# extensions
- 'Extensions/Xtensive.Orm.Logging.log4net/**'
@@ -32,7 +32,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# extensions
- 'Extensions/Xtensive.Orm.Logging.log4net/**'
@@ -59,7 +59,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# extensions
- 'Extensions/Xtensive.Orm.Logging.log4net/**'
@@ -99,7 +99,7 @@ jobs:
name: Core Tests
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
+ net: [ 'net8.0', 'net10.0' ]
# For security reasons we allow test runs either for pushes from the team or for pull-requests after their changes were seen and approved by someone
#
# push filter - to cover pushes from the team to main branch of major version
@@ -110,13 +110,13 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
+ && !startsWith(github.head_ref, 'master-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-independant-tests.yml@7.2
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-independant-tests.yml@master
with:
build_config: Release
target_framework: ${{ matrix.net }}
diff --git a/.github/workflows/auto-firebird3-tests.yml b/.github/workflows/auto-firebird3-tests.yml
index 69fae0dd9..35e06226e 100644
--- a/.github/workflows/auto-firebird3-tests.yml
+++ b/.github/workflows/auto-firebird3-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on Firebird 3 tests triggered by '${{ github.event_name }}'. Run
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/firebird/do-firebird-3_0'
@@ -50,7 +50,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/firebird/do-firebird-3_0'
@@ -95,7 +95,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/firebird/do-firebird-3_0'
@@ -164,12 +164,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: firebird30
build_config: Release
diff --git a/.github/workflows/auto-firebird4-tests.yml b/.github/workflows/auto-firebird4-tests.yml
index 02841c424..19e7b269c 100644
--- a/.github/workflows/auto-firebird4-tests.yml
+++ b/.github/workflows/auto-firebird4-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on Firebird 4 tests triggered by '${{ github.event_name }}'. Run
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/firebird/do-firebird-4_0'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/firebird/do-firebird-4_0'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/firebird/do-firebird-4_0'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: firebird40
build_config: Release
diff --git a/.github/workflows/auto-firebird5-tests.yml b/.github/workflows/auto-firebird5-tests.yml
index 4b297c275..f22c785e4 100644
--- a/.github/workflows/auto-firebird5-tests.yml
+++ b/.github/workflows/auto-firebird5-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on Firebird 5 tests triggered by '${{ github.event_name }}'. Run
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/firebird/do-firebird-5_0'
@@ -50,7 +50,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/firebird/do-firebird-5_0'
@@ -95,7 +95,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/firebird/do-firebird-5_0'
@@ -164,12 +164,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: firebird50
build_config: Release
diff --git a/.github/workflows/auto-mssql2017-tests.yml b/.github/workflows/auto-mssql2017-tests.yml
index 4a8c850cb..45164db0a 100644
--- a/.github/workflows/auto-mssql2017-tests.yml
+++ b/.github/workflows/auto-mssql2017-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on MS SQL Server 2017 tests triggered by '${{ github.event_name
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/mssql/do-mssql-2017'
@@ -38,7 +38,7 @@ on:
- 'TestFileForBuildServerTests.txt'
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mssql/do-mssql-2017'
@@ -72,7 +72,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mssql/do-mssql-2017'
@@ -130,12 +130,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mssql2017
build_config: Release
diff --git a/.github/workflows/auto-mssql2019-tests.yml b/.github/workflows/auto-mssql2019-tests.yml
index fb4bb7a2d..c7770ba84 100644
--- a/.github/workflows/auto-mssql2019-tests.yml
+++ b/.github/workflows/auto-mssql2019-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on MS SQL Server 2019 tests triggered by '${{ github.event_name
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/mssql/do-mssql-2019'
@@ -47,7 +47,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mssql/do-mssql-2019'
@@ -89,7 +89,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mssql/do-mssql-2019'
@@ -144,7 +144,7 @@ jobs:
name: Tests on MS SQL Server 2019
strategy:
matrix:
- net: [ 'net6.0', 'net8.0' ] # only LTS
+ net: [ 'net8.0', 'net10.0' ] # only LTS
# For security reasons we allow test runs either for pushes from the team or for pull-requests after their changes were seen and approved by someone
#
# push filter - to cover pushes from the team to main branch of major version
@@ -155,12 +155,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mssql2019
build_config: Release
diff --git a/.github/workflows/auto-mssql2022-tests.yml b/.github/workflows/auto-mssql2022-tests.yml
index d4fede997..40afa6769 100644
--- a/.github/workflows/auto-mssql2022-tests.yml
+++ b/.github/workflows/auto-mssql2022-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on MS SQL Server 2022 tests triggered by '${{ github.event_name
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/mssql/do-mssql-2022'
@@ -38,7 +38,7 @@ on:
- 'TestFileForBuildServerTests.txt'
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mssql/do-mssql-2022'
@@ -72,7 +72,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mssql/do-mssql-2022'
@@ -130,12 +130,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mssql2022
build_config: Release
diff --git a/.github/workflows/auto-mysql57-tests.yml b/.github/workflows/auto-mysql57-tests.yml
index b02e74a2c..68a4106d5 100644
--- a/.github/workflows/auto-mysql57-tests.yml
+++ b/.github/workflows/auto-mysql57-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on MySQL 5.7 tests triggered by '${{ github.event_name }}'. Run
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
- 'Containers/mysql/do-mysql-5_7'
- 'Containers/mysql/**.sh'
@@ -49,7 +49,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
- 'Containers/mysql/do-mysql-5_7'
- 'Containers/mysql/**.sh'
@@ -93,7 +93,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
- 'Containers/mysql/do-mysql-5_7'
- 'Containers/mysql/**.sh'
@@ -150,7 +150,7 @@ jobs:
name: Tests on MySQL 5.7
strategy:
matrix:
- net: [ 'net6.0', 'net8.0' ] # only LTS
+ net: [ 'net8.0', 'net10.0' ] # only LTS
# For security reasons we allow test runs either for pushes from the team or for pull-requests after their changes were seen and approved by someone
#
# push filter - to cover pushes from the team to main branch of major version
@@ -161,12 +161,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql57
build_config: Release
diff --git a/.github/workflows/auto-mysql80-tests.yml b/.github/workflows/auto-mysql80-tests.yml
index d62284c02..8a1df4ded 100644
--- a/.github/workflows/auto-mysql80-tests.yml
+++ b/.github/workflows/auto-mysql80-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on MySQL 8.0 tests triggered by '${{ github.event_name }}'. Run
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/mysql/do-mysql-8_0'
@@ -50,7 +50,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-8_0'
@@ -95,7 +95,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-8_0'
@@ -153,7 +153,7 @@ jobs:
name: Tests on MySQL 8.0
strategy:
matrix:
- net: [ 'net6.0', 'net8.0' ] # only LTS
+ net: [ 'net8.0', 'net10.0' ] # only LTS
# For security reasons we allow test runs either for pushes from the team or for pull-requests after their changes were seen and approved by someone
#
# push filter - to cover pushes from the team to main branch of major version
@@ -164,12 +164,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql80
build_config: Release
diff --git a/.github/workflows/auto-mysql81-tests.yml b/.github/workflows/auto-mysql81-tests.yml
index 244ae507c..1c189e8d2 100644
--- a/.github/workflows/auto-mysql81-tests.yml
+++ b/.github/workflows/auto-mysql81-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on MySQL 8.1 tests triggered by '${{ github.event_name }}'. Run
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/mysql/do-mysql-8_1'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-8_1'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-8_1'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql81
build_config: Release
diff --git a/.github/workflows/auto-mysql82-tests.yml b/.github/workflows/auto-mysql82-tests.yml
index 99723c07d..26d9e97cd 100644
--- a/.github/workflows/auto-mysql82-tests.yml
+++ b/.github/workflows/auto-mysql82-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on MySQL 8.2 tests triggered by '${{ github.event_name }}'. Run
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/mysql/do-mysql-8_2'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-8_2'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-8_2'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql82
build_config: Release
diff --git a/.github/workflows/auto-mysql83-tests.yml b/.github/workflows/auto-mysql83-tests.yml
index b594b20b3..e27f72678 100644
--- a/.github/workflows/auto-mysql83-tests.yml
+++ b/.github/workflows/auto-mysql83-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on MySQL 8.3 tests triggered by '${{ github.event_name }}'. Run
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/mysql/do-mysql-8_3'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-8_3'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-8_3'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql83
build_config: Release
diff --git a/.github/workflows/auto-mysql84-tests.yml b/.github/workflows/auto-mysql84-tests.yml
index 11a2c10ed..4ec131529 100644
--- a/.github/workflows/auto-mysql84-tests.yml
+++ b/.github/workflows/auto-mysql84-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on MySQL 8.4 tests triggered by '${{ github.event_name }}'. Run
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/mysql/do-mysql-8_4'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-8_4'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-8_4'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql84
build_config: Release
diff --git a/.github/workflows/auto-mysql90-tests.yml b/.github/workflows/auto-mysql90-tests.yml
index 1b3a68f27..d3c19079f 100644
--- a/.github/workflows/auto-mysql90-tests.yml
+++ b/.github/workflows/auto-mysql90-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on MySQL 9.0 tests triggered by '${{ github.event_name }}'. Run
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/mysql/do-mysql-9_0'
@@ -50,7 +50,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-9_0'
@@ -95,7 +95,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-9_0'
@@ -153,7 +153,7 @@ jobs:
name: Tests on MySQL 9.0
strategy:
matrix:
- net: [ 'net6.0', 'net8.0' ] # only LTS
+ net: [ 'net8.0', 'net10.0' ] # only LTS
# For security reasons we allow test runs either for pushes from the team or for pull-requests after their changes were seen and approved by someone
#
# push filter - to cover pushes from the team to main branch of major version
@@ -164,12 +164,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql90
build_config: Release
diff --git a/.github/workflows/auto-mysql91-tests.yml b/.github/workflows/auto-mysql91-tests.yml
index edf0263ae..96e4d3bbc 100644
--- a/.github/workflows/auto-mysql91-tests.yml
+++ b/.github/workflows/auto-mysql91-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on MySQL 9.1 tests triggered by '${{ github.event_name }}'. Run
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/mysql/do-mysql-9_1'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-9_1'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-9_1'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql91
build_config: Release
diff --git a/.github/workflows/auto-mysql92-tests.yml b/.github/workflows/auto-mysql92-tests.yml
index f0998dbee..366616f75 100644
--- a/.github/workflows/auto-mysql92-tests.yml
+++ b/.github/workflows/auto-mysql92-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on MySQL 9.2 tests triggered by '${{ github.event_name }}'. Run
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/mysql/do-mysql-9_2'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-9_2'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-9_2'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql92
build_config: Release
diff --git a/.github/workflows/auto-mysql93-tests.yml b/.github/workflows/auto-mysql93-tests.yml
index 940b3798d..1ca934e79 100644
--- a/.github/workflows/auto-mysql93-tests.yml
+++ b/.github/workflows/auto-mysql93-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on MySQL 9.3 tests triggered by '${{ github.event_name }}'. Run
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/mysql/do-mysql-9_3'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-9_3'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/mysql/do-mysql-9_3'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql93
build_config: Release
diff --git a/.github/workflows/auto-pgsql110-tests.yml b/.github/workflows/auto-pgsql110-tests.yml
index fbf8f3a76..7d139f15b 100644
--- a/.github/workflows/auto-pgsql110-tests.yml
+++ b/.github/workflows/auto-pgsql110-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on PostgreSQL 11.0 tests triggered by '${{ github.event_name }}'
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/postgres/do-postgres-11'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-11'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-11'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql110
build_config: Release
diff --git a/.github/workflows/auto-pgsql120-tests.yml b/.github/workflows/auto-pgsql120-tests.yml
index 56c22fe5c..88eeebc02 100644
--- a/.github/workflows/auto-pgsql120-tests.yml
+++ b/.github/workflows/auto-pgsql120-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on PostgreSQL 12.0 tests triggered by '${{ github.event_name }}'
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/postgres/do-postgres-12'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-12'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-12'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql120
build_config: Release
diff --git a/.github/workflows/auto-pgsql130-tests.yml b/.github/workflows/auto-pgsql130-tests.yml
index c2d9ce307..ad6934f86 100644
--- a/.github/workflows/auto-pgsql130-tests.yml
+++ b/.github/workflows/auto-pgsql130-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on PostgreSQL 13.0 tests triggered by '${{ github.event_name }}'
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/postgres/do-postgres-13'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-13'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-13'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql130
build_config: Release
diff --git a/.github/workflows/auto-pgsql140-tests.yml b/.github/workflows/auto-pgsql140-tests.yml
index e236b14b8..2caeadc9b 100644
--- a/.github/workflows/auto-pgsql140-tests.yml
+++ b/.github/workflows/auto-pgsql140-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on PostgreSQL 14.0 tests triggered by '${{ github.event_name }}'
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/postgres/do-postgres-14'
@@ -47,7 +47,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-14'
@@ -89,7 +89,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-14'
@@ -144,7 +144,7 @@ jobs:
name: Tests on PostgreSQL 14.0
strategy:
matrix:
- net: [ 'net6.0', 'net8.0' ] # only LTS
+ net: [ 'net8.0', 'net10.0' ] # only LTS
# For security reasons we allow test runs either for pushes from the team or for pull-requests after their changes were seen and approved by someone
#
# push filter - to cover pushes from the team to main branch of major version
@@ -155,12 +155,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql140
build_config: Release
diff --git a/.github/workflows/auto-pgsql150-tests.yml b/.github/workflows/auto-pgsql150-tests.yml
index c9c21b936..55959a4a9 100644
--- a/.github/workflows/auto-pgsql150-tests.yml
+++ b/.github/workflows/auto-pgsql150-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on PostgreSQL 15.0 tests triggered by '${{ github.event_name }}'
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/postgres/do-postgres-15'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-15'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-15'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql150
build_config: Release
diff --git a/.github/workflows/auto-pgsql160-tests.yml b/.github/workflows/auto-pgsql160-tests.yml
index 2959e1636..08bf938da 100644
--- a/.github/workflows/auto-pgsql160-tests.yml
+++ b/.github/workflows/auto-pgsql160-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on PostgreSQL 16.0 tests triggered by '${{ github.event_name }}'
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/postgres/do-postgres-16'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-16'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-16'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql160
build_config: Release
diff --git a/.github/workflows/auto-pgsql170-tests.yml b/.github/workflows/auto-pgsql170-tests.yml
index 7f70ab682..df7f75466 100644
--- a/.github/workflows/auto-pgsql170-tests.yml
+++ b/.github/workflows/auto-pgsql170-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on PostgreSQL 17.0 tests triggered by '${{ github.event_name }}'
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/postgres/do-postgres-17'
@@ -50,7 +50,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-17'
@@ -95,7 +95,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-17'
@@ -153,7 +153,7 @@ jobs:
name: Tests on PostgreSQL 17.0
strategy:
matrix:
- net: [ 'net6.0', 'net8.0' ] # only LTS
+ net: [ 'net8.0', 'net10.0' ] # only LTS
# For security reasons we allow test runs either for pushes from the team or for pull-requests after their changes were seen and approved by someone
#
# push filter - to cover pushes from the team to main branch of major version
@@ -164,12 +164,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql170
build_config: Release
diff --git a/.github/workflows/auto-pgsql180-tests.yml b/.github/workflows/auto-pgsql180-tests.yml
index 25fbaed0b..089938a4a 100644
--- a/.github/workflows/auto-pgsql180-tests.yml
+++ b/.github/workflows/auto-pgsql180-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on PostgreSQL 18.0 tests triggered by '${{ github.event_name }}'
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# containers
- 'Containers/postgres/do-postgres-18'
@@ -39,7 +39,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-18'
@@ -73,7 +73,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# containers
- 'Containers/postgres/do-postgres-18'
@@ -131,12 +131,12 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ && !startsWith(github.head_ref, 'master-'))
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql180
build_config: Release
diff --git a/.github/workflows/auto-sqlite3-tests.yml b/.github/workflows/auto-sqlite3-tests.yml
index 35c0c8622..eae392e04 100644
--- a/.github/workflows/auto-sqlite3-tests.yml
+++ b/.github/workflows/auto-sqlite3-tests.yml
@@ -4,8 +4,8 @@ run-name: Tests on SQLite 3 tests triggered by '${{ github.event_name }}'. Run N
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths:
# extensions code only
- 'Extensions/**'
@@ -46,7 +46,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths:
# extensions code only
- 'Extensions/**'
@@ -87,7 +87,7 @@ on:
pull_request_review:
branches:
- - '7.2'
+ - 'master'
paths:
# extensions code only
- 'Extensions/**'
@@ -142,7 +142,7 @@ jobs:
name: Tests on SQLite 3
strategy:
matrix:
- net: [ 'net6.0', 'net8.0' ] # only LTS
+ net: [ 'net8.0', 'net10.0' ] # only LTS
# For security reasons we allow test runs either for pushes from the team or for pull-requests after their changes were seen and approved by someone
#
# push filter - to cover pushes from the team to main branch of major version
@@ -153,13 +153,13 @@ jobs:
github.event_name == 'push'
|| (github.event_name == 'pull_request_review'
&& github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
- && startsWith(github.event.pull_request.base.ref, '7.2')
+ && startsWith(github.event.pull_request.base.ref, 'master')
&& github.event.review.state == 'approved')
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
- && !startsWith(github.head_ref, '7.2-'))
+ && !startsWith(github.head_ref, 'master-'))
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: sqlite3
build_config: Release
diff --git a/.github/workflows/autobuild-on-push-and-pr.yml b/.github/workflows/autobuild-on-push-and-pr.yml
index 32b2b77fd..0007163c9 100644
--- a/.github/workflows/autobuild-on-push-and-pr.yml
+++ b/.github/workflows/autobuild-on-push-and-pr.yml
@@ -4,8 +4,8 @@ run-name: Auto-build run on '${{ github.event_name }}'. Build ${{ github.run_num
on:
push:
branches:
- - '7.2'
- - '7.2-*'
+ - 'master'
+ - 'master-*'
paths-ignore:
- '.github/**'
- 'ChangeLog/**'
@@ -21,7 +21,7 @@ on:
pull_request:
branches:
- - '7.2'
+ - 'master'
paths-ignore:
- '.github/**'
- 'ChangeLog/**'
@@ -59,7 +59,7 @@ jobs:
github.event_name == 'push' ||
(github.event_name == 'pull_request' &&
(github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name ||
- (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name && !startsWith(github.head_ref, '7.2-'))))
+ (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name && !startsWith(github.head_ref, 'master-'))))
steps:
- name: Checkout repo
diff --git a/.github/workflows/dispatched-firebird-tests.yml b/.github/workflows/dispatched-firebird-tests.yml
index 9855039b0..b5df78699 100644
--- a/.github/workflows/dispatched-firebird-tests.yml
+++ b/.github/workflows/dispatched-firebird-tests.yml
@@ -45,8 +45,8 @@ jobs:
if: ${{ inputs.firebird30 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: firebird30
build_config: Release
@@ -65,8 +65,8 @@ jobs:
if: ${{ inputs.firebird40 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: firebird40
build_config: Release
@@ -85,8 +85,8 @@ jobs:
if: ${{ inputs.firebird50 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: firebird50
build_config: Release
diff --git a/.github/workflows/dispatched-mssql-tests.yml b/.github/workflows/dispatched-mssql-tests.yml
index 4f038e7ed..e6dfe586d 100644
--- a/.github/workflows/dispatched-mssql-tests.yml
+++ b/.github/workflows/dispatched-mssql-tests.yml
@@ -45,8 +45,8 @@ jobs:
if: ${{ inputs.mssql2017 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mssql2017
build_config: Release
@@ -65,8 +65,8 @@ jobs:
if: ${{ inputs.mssql2019 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mssql2019
build_config: Release
@@ -85,8 +85,8 @@ jobs:
if: ${{ inputs.mssql2022 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mssql2022
build_config: Release
diff --git a/.github/workflows/dispatched-mysql5-tests.yml b/.github/workflows/dispatched-mysql5-tests.yml
index 74caee8a9..7671204ed 100644
--- a/.github/workflows/dispatched-mysql5-tests.yml
+++ b/.github/workflows/dispatched-mysql5-tests.yml
@@ -13,16 +13,6 @@ on:
type: boolean
default: false
required: true
- mysql55:
- description: 'MySQL 5.5'
- type: boolean
- default: false
- required: true
- mysql56:
- description: 'MySQL 5.6'
- type: boolean
- default: true
- required: true
mysql57:
description: 'MySQL 5.7'
type: boolean
@@ -40,53 +30,13 @@ permissions:
checks: write
jobs:
- test_on_mysql55:
- name: Tests on MySQL 5.5
- if: ${{ inputs.mysql55 }}
- strategy:
- matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
- with:
- storage: mysql55
- build_config: Release
- target_framework: ${{ matrix.net }}
- specific_sha: ${{ inputs.specific_sha }}
- show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
- test_output_verbosity: minimal
- test_run_timeout: 20
- run_main: true
- run_sql: true
- run_extensions: true
- publish_raw_results: true
-
- test_on_mysql56:
- name: Tests on MySQL 5.6
- if: ${{ inputs.mysql56 }}
- strategy:
- matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
- with:
- storage: mysql56
- build_config: Release
- target_framework: ${{ matrix.net }}
- specific_sha: ${{ inputs.specific_sha }}
- show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
- test_output_verbosity: minimal
- test_run_timeout: 30
- run_main: true
- run_sql: true
- run_extensions: true
- publish_raw_results: true
-
test_on_mysql57:
name: Tests on MySQL 5.7
if: ${{ inputs.mysql57 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql57
build_config: Release
diff --git a/.github/workflows/dispatched-mysql8-tests.yml b/.github/workflows/dispatched-mysql8-tests.yml
index 57c3da32e..7d91d434d 100644
--- a/.github/workflows/dispatched-mysql8-tests.yml
+++ b/.github/workflows/dispatched-mysql8-tests.yml
@@ -55,8 +55,8 @@ jobs:
if: ${{ inputs.mysql80 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql80
build_config: Release
@@ -75,8 +75,8 @@ jobs:
if: ${{ inputs.mysql81 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql81
build_config: Release
@@ -95,8 +95,8 @@ jobs:
if: ${{ inputs.mysql82 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql82
build_config: Release
@@ -115,8 +115,8 @@ jobs:
if: ${{ inputs.mysql83 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql83
build_config: Release
@@ -135,8 +135,8 @@ jobs:
if: ${{ inputs.mysql84 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql84
build_config: Release
diff --git a/.github/workflows/dispatched-mysql9-tests.yml b/.github/workflows/dispatched-mysql9-tests.yml
index 5b0e50f9f..608cf2f9a 100644
--- a/.github/workflows/dispatched-mysql9-tests.yml
+++ b/.github/workflows/dispatched-mysql9-tests.yml
@@ -50,8 +50,8 @@ jobs:
if: ${{ inputs.mysql90 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql90
build_config: Release
@@ -70,8 +70,8 @@ jobs:
if: ${{ inputs.mysql91 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql91
build_config: Release
@@ -90,8 +90,8 @@ jobs:
if: ${{ inputs.mysql92 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql92
build_config: Release
@@ -110,8 +110,8 @@ jobs:
if: ${{ inputs.mysql93 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: mysql93
build_config: Release
diff --git a/.github/workflows/dispatched-pgsql10-tests.yml b/.github/workflows/dispatched-pgsql10-tests.yml
index 0521e6205..eb970dc91 100644
--- a/.github/workflows/dispatched-pgsql10-tests.yml
+++ b/.github/workflows/dispatched-pgsql10-tests.yml
@@ -14,12 +14,6 @@ on:
default: false
required: true
# EOL - moved to addtional versions
- #pgsql100:
- # description: 'PostgreSQL 10'
- # type: boolean
- # default: false
- # required: true
- # EOL - moved to addtional versions
#pgsql110:
# description: 'PostgreSQL 11'
# type: boolean
@@ -84,33 +78,13 @@ permissions:
checks: write
jobs:
- test_on_pgsql100:
- name: Tests on PostgreSQL 10
- if: ${{ contains(inputs.additional_versions, 'pgsql100') }}
- strategy:
- matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
- with:
- storage: pgsql100
- build_config: Release
- target_framework: ${{ matrix.net }}
- specific_sha: ${{ inputs.specific_sha }}
- show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
- test_output_verbosity: minimal
- test_run_timeout: 30
- run_main: true
- run_sql: true
- run_extensions: true
- publish_raw_results: true
-
test_on_pgsql110:
name: Tests on PostgreSQL 11
if: ${{ contains(inputs.additional_versions, 'pgsql110') }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql110
build_config: Release
@@ -129,8 +103,8 @@ jobs:
if: ${{ contains(inputs.additional_versions, 'pgsql120') }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql120
build_config: Release
@@ -150,8 +124,8 @@ jobs:
strategy:
fail-fast: false
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql130
build_config: Release
@@ -170,8 +144,8 @@ jobs:
if: ${{ inputs.pgsql140 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql140
build_config: Release
@@ -190,8 +164,8 @@ jobs:
if: ${{ inputs.pgsql150 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql150
build_config: Release
@@ -210,8 +184,8 @@ jobs:
if: ${{ inputs.pgsql160 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql160
build_config: Release
@@ -230,8 +204,8 @@ jobs:
if: ${{ inputs.pgsql170 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql170
build_config: Release
@@ -250,8 +224,8 @@ jobs:
if: ${{ inputs.pgsql180 }}
strategy:
matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ net: [ 'net8.0', 'net10.0' ]
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: pgsql180
build_config: Release
@@ -270,8 +244,8 @@ jobs:
# if: ${{ inputs.pgsql190 }}
# strategy:
# matrix:
- # net: [ 'net6.0', 'net7.0', 'net8.0' ]
- # uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ # net: [ 'net8.0', 'net10.0' ]
+ # uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
# with:
# storage: pgsql190
# build_config: Release
diff --git a/.github/workflows/dispatched-pgsql9-tests.yml b/.github/workflows/dispatched-pgsql9-tests.yml
deleted file mode 100644
index 3dd169712..000000000
--- a/.github/workflows/dispatched-pgsql9-tests.yml
+++ /dev/null
@@ -1,118 +0,0 @@
-name: 🛠🐘 PostgreSQL 9.x tests
-run-name: Run database tests on PostgreSQL on dispatch. Run No ${{ github.run_number }}.
-on:
- workflow_dispatch:
- inputs:
- specific_sha:
- description: 'Commit SHA to checkout'
- required: false
- default: ''
- type: string
- show_all_fails:
- description: 'No mute tests'
- type: boolean
- default: false
- required: true
- pgsql91:
- description: 'PostgreSQL 9.1'
- type: boolean
- default: false
- required: true
- pgsql92:
- description: 'PostgreSQL 9.2'
- type: boolean
- default: false
- required: true
- pgsql96:
- description: 'PostgreSQL 9.6'
- type: boolean
- default: true
- required: true
-
-# new commits with the same key will cancel previously run workflows
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
-
-permissions:
- contents: read
- actions: read
- checks: write
-
-jobs:
- # requires special docker registry because the image is based on schema 1, which is depricated
- #test_on_pgsql90:
- # name: Tests on PostgreSQL 9.0
- # if: ${{ inputs.pgsql90 }}
- # uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
- # with:
- # storage: pgsql90
- # build_config: Release
- # target_frameworks: net6.0
- # specific_sha: ${{ inputs.specific_sha }}
- # test_output_verbosity: minimal
- # test_run_timeout: 70
- # run_main: true
- # run_sql: true
- # run_extensions: true
- # publish_raw_results: false
-
- test_on_pgsql91:
- name: Tests on PostgreSQL 9.1
- if: ${{ inputs.pgsql91 }}
- strategy:
- matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
- with:
- storage: pgsql91
- build_config: Release
- target_framework: ${{ matrix.net }}
- specific_sha: ${{ inputs.specific_sha }}
- show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
- test_output_verbosity: minimal
- test_run_timeout: 30
- run_main: true
- run_sql: true
- run_extensions: true
- publish_raw_results: true
-
- test_on_pgsql92:
- name: Tests on PostgreSQL 9.2
- if: ${{ inputs.pgsql92 }}
- strategy:
- matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
- with:
- storage: pgsql92
- build_config: Release
- target_framework: ${{ matrix.net }}
- specific_sha: ${{ inputs.specific_sha }}
- show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
- test_output_verbosity: minimal
- test_run_timeout: 30
- run_main: true
- run_sql: true
- run_extensions: true
- publish_raw_results: true
-
- test_on_pgsql96:
- name: Tests on PostgreSQL 9.6
- if: ${{ inputs.pgsql96 }}
- strategy:
- matrix:
- net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
- with:
- storage: pgsql96
- build_config: Release
- target_framework: ${{ matrix.net }}
- specific_sha: ${{ inputs.specific_sha }}
- show_all_fails: ${{ fromJSON(inputs.show_all_fails) }}
- test_output_verbosity: minimal
- test_run_timeout: 30
- run_main: true
- run_sql: true
- run_extensions: true
- publish_raw_results: true
diff --git a/.github/workflows/dispatched-sqlite-tests.yml b/.github/workflows/dispatched-sqlite-tests.yml
index c0a0df839..6feeb8395 100644
--- a/.github/workflows/dispatched-sqlite-tests.yml
+++ b/.github/workflows/dispatched-sqlite-tests.yml
@@ -36,7 +36,7 @@ jobs:
strategy:
matrix:
net: [ 'net6.0', 'net7.0', 'net8.0' ]
- uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@7.2
+ uses: DataObjects-NET/dataobjects-net/.github/workflows/reusable-storage-dependant-tests.yml@master
with:
storage: sqlite3
build_config: Release
diff --git a/ChangeLog/7.2.1-Z_Final.txt b/ChangeLog/7.2.1-Z_Final.txt
new file mode 100644
index 000000000..bfa4e69ad
--- /dev/null
+++ b/ChangeLog/7.2.1-Z_Final.txt
@@ -0,0 +1,10 @@
+[main] Added Query.SingleAsync()/SingleOrDefaultAsync and QueryEndpoint.SingleAsync()/SingleOrDefaultAsync methods
+[main] Addressed issue of not disposing IAsyncEnumerator which caused query being open
+[main] Addressed issue of overwriting exception on attempt to rollback the transaction of Domain upgrade if commit operation failed
+[main] LeftJoin extension marked as Obsolete to prepare movement to .NET 10, LeftJoinEx provided as substitution
+[main] IPriorityQueue interface became Obsolete
+[main] EnumerableUtils.One() marked as Obsolete
+[main] Performance and memory usage improvements
+[main] Fixed certain issues connected with SerializableExpressions deserialization
+[postgresql] Update Npgsql to 9.0.4
+[weaver] Updated Mono.Cecil package to v0.11.6, which resolves certain issues of unsynced pdb files
diff --git a/ChangeLog/7.2.1-dev.txt b/ChangeLog/7.2.1-dev.txt
deleted file mode 100644
index eea024a7b..000000000
--- a/ChangeLog/7.2.1-dev.txt
+++ /dev/null
@@ -1 +0,0 @@
-[main] Added Query.SingleAsync()/SingleOrDefaultAsync and QueryEndpoint.SingleAsync()/SingleOrDefaultAsync methods
\ No newline at end of file
diff --git a/Extensions/Xtensive.Orm.Security/Cryptography/MD5HashingService.cs b/Extensions/Xtensive.Orm.Security/Cryptography/MD5HashingService.cs
index ff29af7e8..26d8766d8 100644
--- a/Extensions/Xtensive.Orm.Security/Cryptography/MD5HashingService.cs
+++ b/Extensions/Xtensive.Orm.Security/Cryptography/MD5HashingService.cs
@@ -17,10 +17,7 @@ namespace Xtensive.Orm.Security.Cryptography
public class MD5HashingService : GenericHashingService
{
///
-#pragma warning disable SYSLIB0021 // Type or member is obsolete
- // direct creation is more efficient than MD5.Create()
- protected override HashAlgorithm GetHashAlgorithm() => new MD5CryptoServiceProvider();
-#pragma warning restore SYSLIB0021 // Type or member is obsolete
+ protected override HashAlgorithm GetHashAlgorithm() => MD5.Create();
///
protected override int HashSizeInBytes => MD5.HashSizeInBytes;
diff --git a/Extensions/Xtensive.Orm.Security/Cryptography/SHA1HashingService.cs b/Extensions/Xtensive.Orm.Security/Cryptography/SHA1HashingService.cs
index 7a7488fec..70bedcb2a 100644
--- a/Extensions/Xtensive.Orm.Security/Cryptography/SHA1HashingService.cs
+++ b/Extensions/Xtensive.Orm.Security/Cryptography/SHA1HashingService.cs
@@ -16,13 +16,10 @@ namespace Xtensive.Orm.Security.Cryptography
public class SHA1HashingService : GenericHashingService
{
///
-#pragma warning disable SYSLIB0021 // Type or member is obsolete
- // direct creation is more efficient than SHA1.Create()
- protected override HashAlgorithm GetHashAlgorithm() => new SHA1Managed();
-#pragma warning restore SYSLIB0021 // Type or member is obsolete
-
- ///
- protected override int HashSizeInBytes => SHA1.HashSizeInBytes;
+ protected override int HashSizeInBytes => 20;
+
+ ///
+ protected override HashAlgorithm GetHashAlgorithm() => SHA1.Create();
///
/// Initializes a new instance of the class.
diff --git a/Extensions/Xtensive.Orm.Security/Cryptography/SHA256HashingService.cs b/Extensions/Xtensive.Orm.Security/Cryptography/SHA256HashingService.cs
index 12af5aa14..ced4034d6 100644
--- a/Extensions/Xtensive.Orm.Security/Cryptography/SHA256HashingService.cs
+++ b/Extensions/Xtensive.Orm.Security/Cryptography/SHA256HashingService.cs
@@ -16,10 +16,7 @@ namespace Xtensive.Orm.Security.Cryptography
public class SHA256HashingService : GenericHashingService
{
///
-#pragma warning disable SYSLIB0021 // Type or member is obsolete
- // direct creation is more efficient than SHA256.Create()
- protected override HashAlgorithm GetHashAlgorithm() => new SHA256Managed();
-#pragma warning restore SYSLIB0021 // Type or member is obsolete
+ protected override HashAlgorithm GetHashAlgorithm() => SHA256.Create();
///
protected override int HashSizeInBytes => SHA256.HashSizeInBytes;
diff --git a/Extensions/Xtensive.Orm.Security/Cryptography/SHA384HashingService.cs b/Extensions/Xtensive.Orm.Security/Cryptography/SHA384HashingService.cs
index cde63ebb6..83aceb110 100644
--- a/Extensions/Xtensive.Orm.Security/Cryptography/SHA384HashingService.cs
+++ b/Extensions/Xtensive.Orm.Security/Cryptography/SHA384HashingService.cs
@@ -16,10 +16,7 @@ namespace Xtensive.Orm.Security.Cryptography
public class SHA384HashingService : GenericHashingService
{
///
-#pragma warning disable SYSLIB0021 // Type or member is obsolete
- // direct creation is more efficient than SHA384.Create()
- protected override HashAlgorithm GetHashAlgorithm() => new SHA384Managed();
-#pragma warning restore SYSLIB0021 // Type or member is obsolete
+ protected override HashAlgorithm GetHashAlgorithm() => SHA384.Create();
///
protected override int HashSizeInBytes => SHA384.HashSizeInBytes;
diff --git a/Extensions/Xtensive.Orm.Security/Cryptography/SHA512HashingService.cs b/Extensions/Xtensive.Orm.Security/Cryptography/SHA512HashingService.cs
index d67b05c44..0ef1be03d 100644
--- a/Extensions/Xtensive.Orm.Security/Cryptography/SHA512HashingService.cs
+++ b/Extensions/Xtensive.Orm.Security/Cryptography/SHA512HashingService.cs
@@ -16,10 +16,7 @@ namespace Xtensive.Orm.Security.Cryptography
public class SHA512HashingService : GenericHashingService
{
///
-#pragma warning disable SYSLIB0021 // Type or member is obsolete
- // direct creation is more efficient than SHA512.Create()
- protected override HashAlgorithm GetHashAlgorithm() => new SHA512Managed();
-#pragma warning restore SYSLIB0021 // Type or member is obsolete
+ protected override HashAlgorithm GetHashAlgorithm() => SHA512.Create();
///
protected override int HashSizeInBytes => SHA512.HashSizeInBytes;
diff --git a/Extensions/Xtensive.Orm.Security/ImpersonationContext.cs b/Extensions/Xtensive.Orm.Security/ImpersonationContext.cs
index 6e44b33f1..3101fd7f2 100644
--- a/Extensions/Xtensive.Orm.Security/ImpersonationContext.cs
+++ b/Extensions/Xtensive.Orm.Security/ImpersonationContext.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using Xtensive.Core;
namespace Xtensive.Orm.Security
diff --git a/Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v11_0/Extractor.cs b/Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v11_0/Extractor.cs
index 0169acf70..cce8cbbeb 100644
--- a/Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v11_0/Extractor.cs
+++ b/Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v11_0/Extractor.cs
@@ -624,7 +624,7 @@ protected virtual ISqlCompileUnit BuildExtractSchemaContentsQuery(ExtractionCont
var relationsTable = PgClass;
var tablespacesTable = PgTablespace;
- var join = relationsTable.LeftOuterJoin(tablespacesTable,
+ var join = relationsTable.LeftJoinEx(tablespacesTable,
tablespacesTable["oid"] == relationsTable["reltablespace"]);
var select = SqlDml.Select(join);
select.Where = relationsTable["relowner"] == context.CurrentUserIdentifier
@@ -735,7 +735,7 @@ protected virtual ISqlCompileUnit BuildExtractTableAndViewColumnsQuery(Extractio
var typesTable = PgType;
var select = SqlDml.Select(columnsTable
- .LeftOuterJoin(defaultValuesTable,
+ .LeftJoinEx(defaultValuesTable,
columnsTable["attrelid"] == defaultValuesTable["adrelid"]
&& columnsTable["attnum"] == defaultValuesTable["adnum"])
.InnerJoin(typesTable, typesTable["oid"] == columnsTable["atttypid"]));
@@ -889,7 +889,7 @@ protected virtual ISqlCompileUnit BuildExtractTableIndexesQuery(ExtractionContex
//not automatically created indexes of our tables
var select = SqlDml.Select(indexTable
.InnerJoin(relationsTable, relationsTable["oid"] == indexTable["indexrelid"])
- .LeftOuterJoin(tableSpacesTable, tableSpacesTable["oid"] == relationsTable["reltablespace"]));
+ .LeftJoinEx(tableSpacesTable, tableSpacesTable["oid"] == relationsTable["reltablespace"]));
select.Where = SqlDml.In(indexTable["indrelid"], CreateOidRow(tableMap.Keys)) && !SqlDml.Exists(subSelect);
select.Columns.Add(indexTable["indrelid"]);
select.Columns.Add(indexTable["indexrelid"]);
diff --git a/Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v12_0/Extractor.cs b/Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v12_0/Extractor.cs
index a22674cb0..c02cbb256 100644
--- a/Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v12_0/Extractor.cs
+++ b/Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v12_0/Extractor.cs
@@ -33,7 +33,7 @@ protected override ISqlCompileUnit BuildExtractTableAndViewColumnsQuery(Extracti
var typesTable = PgType;
var select = SqlDml.Select(columnsTable
- .LeftOuterJoin(defaultValuesTable,
+ .LeftJoinEx(defaultValuesTable,
columnsTable["attrelid"] == defaultValuesTable["adrelid"]
&& columnsTable["attnum"] == defaultValuesTable["adnum"])
.InnerJoin(typesTable, typesTable["oid"] == columnsTable["atttypid"]));
@@ -103,7 +103,7 @@ protected override ISqlCompileUnit BuildExtractTableIndexesQuery(ExtractionConte
//not automatically created indexes of our tables
var select = SqlDml.Select(indexTable
.InnerJoin(relationsTable, relationsTable["oid"] == indexTable["indexrelid"])
- .LeftOuterJoin(tableSpacesTable, tableSpacesTable["oid"] == relationsTable["reltablespace"]));
+ .LeftJoinEx(tableSpacesTable, tableSpacesTable["oid"] == relationsTable["reltablespace"]));
select.Where = SqlDml.In(indexTable["indrelid"], CreateOidRow(tableMap.Keys)) && !SqlDml.Exists(subSelect);
select.Columns.Add(indexTable["indrelid"]);
select.Columns.Add(indexTable["indexrelid"]);
diff --git a/Orm/Xtensive.Orm.SqlServer/Sql.Drivers.SqlServer/v13/Extractor.cs b/Orm/Xtensive.Orm.SqlServer/Sql.Drivers.SqlServer/v13/Extractor.cs
index 9f5b4e5f3..e03c41382 100644
--- a/Orm/Xtensive.Orm.SqlServer/Sql.Drivers.SqlServer/v13/Extractor.cs
+++ b/Orm/Xtensive.Orm.SqlServer/Sql.Drivers.SqlServer/v13/Extractor.cs
@@ -96,7 +96,7 @@ public override async Task ExtractSchemesAsync(
string catalogName, string[] schemaNames, CancellationToken token = default)
{
var context = CreateContext(catalogName, schemaNames);
- await ExtractCatalogContentsAsync(context, token).ConfigureAwait(false);
+ await ExtractCatalogContentsAsync(context, token).ConfigureAwaitFalse();
return context.Catalog;
}
@@ -115,15 +115,15 @@ protected virtual void ExtractCatalogContents(ExtractionContext context)
protected virtual async Task ExtractCatalogContentsAsync(ExtractionContext context, CancellationToken token)
{
- await ExtractSchemasAsync(context, token).ConfigureAwait(false);
+ await ExtractSchemasAsync(context, token).ConfigureAwaitFalse();
RegisterReplacements(context);
- await ExtractTypesAsync(context, token).ConfigureAwait(false);
- await ExtractTablesAndViewsAsync(context, token).ConfigureAwait(false);
- await ExtractColumnsAsync(context, token).ConfigureAwait(false);
- await ExtractIndexesAsync(context, token).ConfigureAwait(false);
- await ExtractForeignKeysAsync(context, token).ConfigureAwait(false);
- await ExtractFulltextIndexesAsync(context, token).ConfigureAwait(false);
- await ExtractSequencesAsync(context, token).ConfigureAwait(false);
+ await ExtractTypesAsync(context, token).ConfigureAwaitFalse();
+ await ExtractTablesAndViewsAsync(context, token).ConfigureAwaitFalse();
+ await ExtractColumnsAsync(context, token).ConfigureAwaitFalse();
+ await ExtractIndexesAsync(context, token).ConfigureAwaitFalse();
+ await ExtractForeignKeysAsync(context, token).ConfigureAwaitFalse();
+ await ExtractFulltextIndexesAsync(context, token).ConfigureAwaitFalse();
+ await ExtractSequencesAsync(context, token).ConfigureAwaitFalse();
}
protected virtual void RegisterReplacements(ExtractionContext context)
@@ -162,10 +162,10 @@ private async Task ExtractSchemasAsync(ExtractionContext context, CancellationTo
var query = BuildExtractSchemasQuery(context);
var cmd = Connection.CreateCommand(query);
- await using (cmd.ConfigureAwait(false)) {
- var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwait(false);
- await using (reader.ConfigureAwait(false)) {
- while (await reader.ReadAsync(token).ConfigureAwait(false)) {
+ await using (cmd.ConfigureAwaitFalse()) {
+ var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwaitFalse();
+ await using (reader.ConfigureAwaitFalse()) {
+ while (await reader.ReadAsync(token).ConfigureAwaitFalse()) {
ReadSchemaData(reader, context);
}
}
@@ -215,10 +215,10 @@ private async Task ExtractTypesAsync(ExtractionContext context, CancellationToke
var query = BuildExtractTypesQuery(context);
var command = Connection.CreateCommand(query);
- await using (command.ConfigureAwait(false)) {
- var reader = await command.ExecuteReaderAsync(token).ConfigureAwait(false);
- await using (reader.ConfigureAwait(false)) {
- while (await reader.ReadAsync(token).ConfigureAwait(false)) {
+ await using (command.ConfigureAwaitFalse()) {
+ var reader = await command.ExecuteReaderAsync(token).ConfigureAwaitFalse();
+ await using (reader.ConfigureAwaitFalse()) {
+ while (await reader.ReadAsync(token).ConfigureAwaitFalse()) {
ReadTypeData(reader, context);
}
}
@@ -285,10 +285,10 @@ private async Task ExtractTablesAndViewsAsync(ExtractionContext context, Cancell
var query = BuildExtractTablesAndViewsQuery(context);
var cmd = Connection.CreateCommand(query);
- await using (cmd.ConfigureAwait(false)) {
- var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwait(false);
- await using (reader.ConfigureAwait(false)) {
- while (await reader.ReadAsync(token).ConfigureAwait(false)) {
+ await using (cmd.ConfigureAwaitFalse()) {
+ var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwaitFalse();
+ await using (reader.ConfigureAwaitFalse()) {
+ while (await reader.ReadAsync(token).ConfigureAwaitFalse()) {
ReadTableOrViewData(reader, context);
}
}
@@ -371,10 +371,10 @@ private async Task ExtractColumnsAsync(ExtractionContext context, CancellationTo
var currentTableId = 0;
var cmd = Connection.CreateCommand(query);
ColumnResolver columnResolver = null;
- await using (cmd.ConfigureAwait(false)) {
- var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwait(false);
- await using (reader.ConfigureAwait(false)) {
- while (await reader.ReadAsync(token).ConfigureAwait(false)) {
+ await using (cmd.ConfigureAwaitFalse()) {
+ var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwaitFalse();
+ await using (reader.ConfigureAwaitFalse()) {
+ while (await reader.ReadAsync(token).ConfigureAwaitFalse()) {
ReadColumnData(context, reader, ref currentTableId, ref columnResolver);
}
}
@@ -383,10 +383,10 @@ private async Task ExtractColumnsAsync(ExtractionContext context, CancellationTo
query = BuildExtractIdentityColumnsQuery(context);
cmd = Connection.CreateCommand(query);
- await using (cmd.ConfigureAwait(false)) {
- var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwait(false);
- await using (reader.ConfigureAwait(false)) {
- while (await reader.ReadAsync(token).ConfigureAwait(false)) {
+ await using (cmd.ConfigureAwaitFalse()) {
+ var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwaitFalse();
+ await using (reader.ConfigureAwaitFalse()) {
+ while (await reader.ReadAsync(token).ConfigureAwaitFalse()) {
ReadIdentityColumnData(reader, context);
}
}
@@ -625,10 +625,10 @@ private async Task ExtractIndexesAsync(ExtractionContext context, CancellationTo
PrimaryKey primaryKey = null;
UniqueConstraint uniqueConstraint = null;
var cmd = Connection.CreateCommand(query);
- await using (cmd.ConfigureAwait(false)) {
- var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwait(false);
- await using (reader.ConfigureAwait(false)) {
- while (await reader.ReadAsync(token).ConfigureAwait(false)) {
+ await using (cmd.ConfigureAwaitFalse()) {
+ var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwaitFalse();
+ await using (reader.ConfigureAwaitFalse()) {
+ while (await reader.ReadAsync(token).ConfigureAwaitFalse()) {
ReadIndexColumnData(reader, context,
ref tableId, spatialIndexType, ref primaryKey, ref uniqueConstraint, ref index, ref table);
}
@@ -736,10 +736,10 @@ private async Task ExtractForeignKeysAsync(ExtractionContext context, Cancellati
ColumnResolver referencedTable = null;
ForeignKey foreignKey = null;
var cmd = Connection.CreateCommand(query);
- await using (cmd.ConfigureAwait(false)) {
- var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwait(false);
- await using (reader.ConfigureAwait(false)) {
- while (await reader.ReadAsync(token).ConfigureAwait(false)) {
+ await using (cmd.ConfigureAwaitFalse()) {
+ var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwaitFalse();
+ await using (reader.ConfigureAwaitFalse()) {
+ while (await reader.ReadAsync(token).ConfigureAwaitFalse()) {
ReadForeignKeyColumnData(reader, context, ref tableId, ref foreignKey, ref referencingTable, ref referencedTable);
}
}
@@ -812,10 +812,10 @@ protected virtual async Task ExtractFulltextIndexesAsync(ExtractionContext conte
ColumnResolver table = null;
FullTextIndex index = null;
var cmd = Connection.CreateCommand(query);
- await using (cmd.ConfigureAwait(false)) {
- var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwait(false);
- await using (reader.ConfigureAwait(false)) {
- while (await reader.ReadAsync(token).ConfigureAwait(false)) {
+ await using (cmd.ConfigureAwaitFalse()) {
+ var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwaitFalse();
+ await using (reader.ConfigureAwaitFalse()) {
+ while (await reader.ReadAsync(token).ConfigureAwaitFalse()) {
ReadFullTextIndexColumnData(reader, context, ref currentTableId, ref table, ref index);
}
}
@@ -999,10 +999,10 @@ private async Task ExtractSequencesAsync(ExtractionContext context, Cancellation
var query = BuildExtractSequencesQuery(context);
var cmd = Connection.CreateCommand(query);
- await using (cmd.ConfigureAwait(false)) {
- var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwait(false);
- await using (reader.ConfigureAwait(false)) {
- while (await reader.ReadAsync(token).ConfigureAwait(false)) {
+ await using (cmd.ConfigureAwaitFalse()) {
+ var reader = await cmd.ExecuteReaderAsync(token).ConfigureAwaitFalse();
+ await using (reader.ConfigureAwaitFalse()) {
+ while (await reader.ReadAsync(token).ConfigureAwaitFalse()) {
ReadSequenceData(reader, context);
}
}
diff --git a/Orm/Xtensive.Orm.Sqlite/Sql.Drivers.Sqlite/ProviderInitializer.cs b/Orm/Xtensive.Orm.Sqlite/Sql.Drivers.Sqlite/ProviderInitializer.cs
index b7a6aca3a..467eefbe8 100644
--- a/Orm/Xtensive.Orm.Sqlite/Sql.Drivers.Sqlite/ProviderInitializer.cs
+++ b/Orm/Xtensive.Orm.Sqlite/Sql.Drivers.Sqlite/ProviderInitializer.cs
@@ -53,9 +53,7 @@ private static Stream GetLibraryStream()
private static string GetLibraryHash()
{
-#pragma warning disable SYSLIB0021 // Type or member is obsolete
- // direct creation is more efficient than SHA1.Create()
- using (var hashProvider = new System.Security.Cryptography.SHA1Managed()) {
+ using (var hashProvider = SHA1.Create()) {
//hashProvider.Initialize();
ReadOnlySpan hashRaw;
using (var stream = GetLibraryStream()) {
@@ -63,7 +61,6 @@ private static string GetLibraryHash()
}
return new StringBuilder().AppendHexArray(hashRaw[..8]).ToString();
}
-#pragma warning restore SYSLIB0021 // Type or member is obsolete
}
private static string GetLibraryFileName(string nativeLibraryCacheFolder, string moduleHash)
diff --git a/Orm/Xtensive.Orm.Tests.Core/Collections/CollectionUtilsTest.cs b/Orm/Xtensive.Orm.Tests.Core/Collections/CollectionUtilsTest.cs
index e888bba33..e747e40cd 100644
--- a/Orm/Xtensive.Orm.Tests.Core/Collections/CollectionUtilsTest.cs
+++ b/Orm/Xtensive.Orm.Tests.Core/Collections/CollectionUtilsTest.cs
@@ -16,6 +16,7 @@ namespace Xtensive.Orm.Tests.Core.Collections
public class CollectionUtilsTest
{
[Test]
+ [Obsolete]
public void RangeToArrayTest()
{
Assert.That(CollectionUtils.RangeToArray(1, 10).SequenceEqual(Enumerable.Range(1, 10)));
@@ -24,6 +25,7 @@ public void RangeToArrayTest()
}
[Test]
+ [Obsolete]
public void RangeToListTest()
{
Assert.That(CollectionUtils.RangeToList(1, 10).SequenceEqual(Enumerable.Range(1, 10).Select(i => (ColNum)i)));
diff --git a/Orm/Xtensive.Orm.Tests.Core/Tuples/DummyTuple.cs b/Orm/Xtensive.Orm.Tests.Core/Tuples/DummyTuple.cs
index a82e35f3f..bab6533ee 100644
--- a/Orm/Xtensive.Orm.Tests.Core/Tuples/DummyTuple.cs
+++ b/Orm/Xtensive.Orm.Tests.Core/Tuples/DummyTuple.cs
@@ -14,7 +14,7 @@ namespace Xtensive.Orm.Tests.Core.Tuples
{
public class DummyTuple: Xtensive.Tuples.Tuple
{
- private TupleDescriptor descriptor;
+ private readonly TupleDescriptor descriptor;
private BitArray available;
private object[] values;
@@ -81,7 +81,7 @@ public override void SetValue(int fieldIndex, object fieldValue)
public DummyTuple(TupleDescriptor descriptor)
{
- ArgumentNullException.ThrowIfNull(descriptor);
+ ArgumentValidator.EnsureArgumentIsNotDefault(descriptor, nameof(descriptor));
this.descriptor = descriptor;
values = new object[descriptor.Count];
available = new BitArray(new bool[descriptor.Count]);
diff --git a/Orm/Xtensive.Orm.Tests.Framework/Orm.config b/Orm/Xtensive.Orm.Tests.Framework/Orm.config
index 12434b9b8..2fd979363 100644
--- a/Orm/Xtensive.Orm.Tests.Framework/Orm.config
+++ b/Orm/Xtensive.Orm.Tests.Framework/Orm.config
@@ -23,24 +23,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -81,12 +63,6 @@
-
-
-
-
@@ -122,9 +98,6 @@
-
-
@@ -159,28 +132,11 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
@@ -221,12 +177,6 @@
-
-
-
-
@@ -262,9 +212,6 @@
-
-
diff --git a/Orm/Xtensive.Orm.Tests.Sql/SqlServer/MSSQLTests.cs b/Orm/Xtensive.Orm.Tests.Sql/SqlServer/MSSQLTests.cs
index 66c4c36ec..b21ffdd1e 100644
--- a/Orm/Xtensive.Orm.Tests.Sql/SqlServer/MSSQLTests.cs
+++ b/Orm/Xtensive.Orm.Tests.Sql/SqlServer/MSSQLTests.cs
@@ -2562,7 +2562,7 @@ public void Test115()
var p = SqlDml.TableRef(Catalog.Schemas["Production"].Tables["Product"], "p");
var pr = SqlDml.TableRef(Catalog.Schemas["Production"].Tables["ProductReview"], "pr");
- var select = SqlDml.Select(p.LeftOuterJoin(pr, p["ProductID"]==pr["ProductID"]));
+ var select = SqlDml.Select(p.LeftJoinEx(pr, p["ProductID"]==pr["ProductID"]));
select.Columns.AddRange(p["Name"], pr["ProductReviewID"]);
Assert.That(CompareExecuteDataReader(nativeSql, select), Is.True);
diff --git a/Orm/Xtensive.Orm.Tests/Issues/IssueGithub0114_QueryRootReuseCauseNoRefJoin.cs b/Orm/Xtensive.Orm.Tests/Issues/IssueGithub0114_QueryRootReuseCauseNoRefJoin.cs
index 7a2509434..fcb47e498 100644
--- a/Orm/Xtensive.Orm.Tests/Issues/IssueGithub0114_QueryRootReuseCauseNoRefJoin.cs
+++ b/Orm/Xtensive.Orm.Tests/Issues/IssueGithub0114_QueryRootReuseCauseNoRefJoin.cs
@@ -2389,7 +2389,7 @@ public void LeftJoinQueryReuse()
.Select(promo => new {
promo,
notifications = session.Query.All()
- .LeftOuterJoin(session.Query.All(), n => n.TriggeredBy.Id, u => u.Id, (n, u) => new { n, u })
+ .LeftJoinEx(session.Query.All(), n => n.TriggeredBy.Id, u => u.Id, (n, u) => new { n, u })
})
.Select(anon => new {
contacted = anon.notifications.Select(c => c.n.Recipient.User.Id)
@@ -2401,9 +2401,9 @@ public void LeftJoinQueryReuse()
.Select(promo => new { promo })
.Select(anon => new {
contacted = session.Query.All()
- .LeftOuterJoin(session.Query.All(), n => n.TriggeredBy.Id, u => u.Id, (n, u) => new { n, u }).Select(c => c.n.Recipient.User.Id)
+ .LeftJoinEx(session.Query.All(), n => n.TriggeredBy.Id, u => u.Id, (n, u) => new { n, u }).Select(c => c.n.Recipient.User.Id)
.Concat(session.Query.All()
- .LeftOuterJoin(session.Query.All(), n => n.TriggeredBy.Id, u => u.Id, (n, u) => new { n, u }).Select(c => c.n.Recipient.User.Id)),
+ .LeftJoinEx(session.Query.All(), n => n.TriggeredBy.Id, u => u.Id, (n, u) => new { n, u }).Select(c => c.n.Recipient.User.Id)),
promo = anon.promo
}).ToArray();
diff --git a/Orm/Xtensive.Orm.Tests/Issues/IssueGithub0171_ReadDateTimeOffsetFromPackedTuple.cs b/Orm/Xtensive.Orm.Tests/Issues/IssueGithub0171_ReadDateTimeOffsetFromPackedTuple.cs
index ca963bba5..67f97769e 100644
--- a/Orm/Xtensive.Orm.Tests/Issues/IssueGithub0171_ReadDateTimeOffsetFromPackedTuple.cs
+++ b/Orm/Xtensive.Orm.Tests/Issues/IssueGithub0171_ReadDateTimeOffsetFromPackedTuple.cs
@@ -78,7 +78,7 @@ public void DateTimeOffsetCase()
var loadWithCargo = new CargoLoad(session, cargo);
var query = session.Query.All()
- .LeftOuterJoin(session.Query.All(),
+ .LeftJoinEx(session.Query.All(),
cl => cl.Cargo,
c => c,
(cl, c) => new { CargoLoad = cl, Cargo = c })
@@ -102,7 +102,7 @@ public void DateTimeCase()
var loadWithCargo = new CargoLoad(session, cargo);
var query = session.Query.All()
- .LeftOuterJoin(session.Query.All(),
+ .LeftJoinEx(session.Query.All(),
cl => cl.Cargo,
c => c,
(cl, c) => new { CargoLoad = cl, Cargo = c })
diff --git a/Orm/Xtensive.Orm.Tests/Issues/IssueJira0553_IncorrectLeftJoinOnNotNullEntityField.cs b/Orm/Xtensive.Orm.Tests/Issues/IssueJira0553_IncorrectLeftJoinOnNotNullEntityField.cs
index 10e05e255..c01a8114f 100644
--- a/Orm/Xtensive.Orm.Tests/Issues/IssueJira0553_IncorrectLeftJoinOnNotNullEntityField.cs
+++ b/Orm/Xtensive.Orm.Tests/Issues/IssueJira0553_IncorrectLeftJoinOnNotNullEntityField.cs
@@ -136,7 +136,7 @@ public void BadWorkTest()
using (var session = Domain.OpenSession())
using (var t = session.OpenTransaction()) {
var badResult = session.Query.All()
- .LeftOuterJoin(
+ .LeftJoinEx(
session.Query.All(),
e => e.Id,
ewc => ewc.Id,
@@ -155,7 +155,7 @@ public void GoodWorkTest()
using (var session = Domain.OpenSession())
using (var transaction = session.OpenTransaction()) {
var goodResult = session.Query.All()
- .LeftOuterJoin(
+ .LeftJoinEx(
session.Query.All(),
e => e.Id,
ewc => ewc.Id,
@@ -173,7 +173,7 @@ public void WorkaroundTest()
using (var session = Domain.OpenSession())
using (var transaction = session.OpenTransaction()) {
var wordaround = session.Query.All()
- .LeftOuterJoin(
+ .LeftJoinEx(
session.Query.All(),
e => e.Id,
ewc => ewc.Id,
@@ -181,7 +181,7 @@ public void WorkaroundTest()
e.Id,
CarId = ewc.Car.Id
})
- .LeftOuterJoin(
+ .LeftJoinEx(
session.Query.All(),
e => e.CarId,
c => c.Id,
diff --git a/Orm/Xtensive.Orm.Tests/Issues/IssueJira0584_IncorrectMappingOfColumnInQuery.cs b/Orm/Xtensive.Orm.Tests/Issues/IssueJira0584_IncorrectMappingOfColumnInQuery.cs
index 409077418..272fdf6f0 100644
--- a/Orm/Xtensive.Orm.Tests/Issues/IssueJira0584_IncorrectMappingOfColumnInQuery.cs
+++ b/Orm/Xtensive.Orm.Tests/Issues/IssueJira0584_IncorrectMappingOfColumnInQuery.cs
@@ -526,8 +526,8 @@ public void IncludeProviderOptimizationTest01()
var usefulColumns = masterCredit.Union(masterDebit);
var readyForFilterQuery = from joinResult in usefulColumns
- .LeftOuterJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
- .LeftOuterJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
+ .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
+ .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
let item = joinResult.pp
select new CustomPosting() {
Id = item.Id,
@@ -609,8 +609,8 @@ public void IncludeProviderOptimizationTest02()
var usefulColumns = masterCredit.Union(masterDebit);
var readyForFilterQuery = from joinResult in usefulColumns
- .LeftOuterJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
- .LeftOuterJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
+ .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
+ .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
let item = joinResult.pp
select new CustomPosting {
Id = item.Id,
@@ -692,8 +692,8 @@ public void IncludeProviderOptimizationTest03()
var usefulColumns = masterCredit.Union(masterDebit);
var readyForFilterQuery = from joinResult in usefulColumns
- .LeftOuterJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
- .LeftOuterJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
+ .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
+ .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
let item = joinResult.pp
select new CustomPosting {
Id = item.Id,
@@ -776,8 +776,8 @@ public void IncludeProviderOptimizationTest04()
var usefulColumns = masterCredit.Union(masterDebit);
var readyForFilterQuery = from joinResult in usefulColumns
- .LeftOuterJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
- .LeftOuterJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
+ .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
+ .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
let item = joinResult.pp
select new CustomPosting {
Id = item.Id,
@@ -859,8 +859,8 @@ public void IncludeProviderOptimizationTest05()
var usefulColumns = masterCredit.Union(masterDebit);
var readyForFilterQuery = from joinResult in usefulColumns
- .LeftOuterJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
- .LeftOuterJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
+ .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
+ .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
let item = joinResult.pp
select new CustomPosting {
Id = item.Id,
@@ -1029,7 +1029,7 @@ public void JoinAsSourceOfSetOperation()
var result =
from r in
preResult.Join(tp.Distinct(), a => a.MasterAccount, a => a.Account, (a, pm) => new {pp = a, pm})
- .LeftOuterJoin(Query.All(), a => a.pm.FinToolKind, a => a.Id, (a, b) => new {pp = a.pp, pm = a.pm, fk = b})
+ .LeftJoinEx(Query.All(), a => a.pm.FinToolKind, a => a.Id, (a, b) => new {pp = a.pp, pm = a.pm, fk = b})
let q = r.pp
select
new {
diff --git a/Orm/Xtensive.Orm.Tests/Issues/IssueJira0586_AnonymousTypeComparisonBug.cs b/Orm/Xtensive.Orm.Tests/Issues/IssueJira0586_AnonymousTypeComparisonBug.cs
index 2ea6b5a0e..8080bfd0a 100644
--- a/Orm/Xtensive.Orm.Tests/Issues/IssueJira0586_AnonymousTypeComparisonBug.cs
+++ b/Orm/Xtensive.Orm.Tests/Issues/IssueJira0586_AnonymousTypeComparisonBug.cs
@@ -108,7 +108,7 @@ public void MainTest()
var masterCredit = Query.All();
- var join = from r in masterCredit.LeftOuterJoin(
+ var join = from r in masterCredit.LeftJoinEx(
tableParts,
a => a.CreditAccount.Id,
a => a.Account.Id,
diff --git a/Orm/Xtensive.Orm.Tests/Issues/IssueJira0617_IncorrectRemoveOfRedundantColumns.cs b/Orm/Xtensive.Orm.Tests/Issues/IssueJira0617_IncorrectRemoveOfRedundantColumns.cs
index 2c2eaf62a..a2b9c6687 100644
--- a/Orm/Xtensive.Orm.Tests/Issues/IssueJira0617_IncorrectRemoveOfRedundantColumns.cs
+++ b/Orm/Xtensive.Orm.Tests/Issues/IssueJira0617_IncorrectRemoveOfRedundantColumns.cs
@@ -68,8 +68,8 @@ public void Test01()
var usefulColumns = masterCredit.Union(masterDebit);
var readyForFilterQuery = from joinResult in usefulColumns
- .LeftOuterJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
- .LeftOuterJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
+ .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
+ .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
let item = joinResult.pp
select new CustomPosting() {
Id = item.Id,
@@ -149,8 +149,8 @@ public void Test02()
var usefulColumns = masterCredit.Union(masterDebit);
var readyForFilterQuery = from joinResult in usefulColumns
- .LeftOuterJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
- .LeftOuterJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
+ .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
+ .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
let item = joinResult.pp
select new CustomPosting {
Id = item.Id,
@@ -230,8 +230,8 @@ public void Test03()
var usefulColumns = masterCredit.Union(masterDebit);
var readyForFilterQuery = from joinResult in usefulColumns
- .LeftOuterJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
- .LeftOuterJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
+ .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
+ .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
let item = joinResult.pp
select new CustomPosting {
Id = item.Id,
@@ -312,8 +312,8 @@ public void Test04()
var usefulColumns = masterCredit.Union(masterDebit);
var readyForFilterQuery = from joinResult in usefulColumns
- .LeftOuterJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
- .LeftOuterJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
+ .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
+ .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
let item = joinResult.pp
select new CustomPosting {
Id = item.Id,
@@ -393,8 +393,8 @@ public void Test05()
var usefulColumns = masterCredit.Union(masterDebit);
var readyForFilterQuery = from joinResult in usefulColumns
- .LeftOuterJoin(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
- .LeftOuterJoin(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
+ .LeftJoinEx(priceCalculation, a => a.SlaveAccount, a => a.Account, (pp, ps) => new {pp, ps})
+ .LeftJoinEx(priceCalculation, a => a.pp.MasterAccount, a => a.Account, (a, pm) => new {a.pp, a.ps, pm})
let item = joinResult.pp
select new CustomPosting {
Id = item.Id,
@@ -562,7 +562,7 @@ public void Test08()
var result =
from r in
preResult.Join(tp.Distinct(), a => a.MasterAccount, a => a.Account, (a, pm) => new {pp = a, pm})
- .LeftOuterJoin(Query.All(), a => a.pm.FinToolKind, a => a.Id, (a, b) => new {pp = a.pp, pm = a.pm, fk = b})
+ .LeftJoinEx(Query.All(), a => a.pm.FinToolKind, a => a.Id, (a, b) => new {pp = a.pp, pm = a.pm, fk = b})
let q = r.pp
select
new {
diff --git a/Orm/Xtensive.Orm.Tests/Issues/IssueJira0803_ReuseOfJoiningExpressionCausesWrongTranslation.cs b/Orm/Xtensive.Orm.Tests/Issues/IssueJira0803_ReuseOfJoiningExpressionCausesWrongTranslation.cs
index 8e4e1bebe..57d5c648a 100644
--- a/Orm/Xtensive.Orm.Tests/Issues/IssueJira0803_ReuseOfJoiningExpressionCausesWrongTranslation.cs
+++ b/Orm/Xtensive.Orm.Tests/Issues/IssueJira0803_ReuseOfJoiningExpressionCausesWrongTranslation.cs
@@ -66,7 +66,7 @@ public void LeftJoinOneVariableUsage()
using (var tx = session.OpenTransaction()) {
var leftJoinWithExpression = session.Query.All()
- .LeftOuterJoin(session.Query.All().Where(it => it.Description == null),
+ .LeftJoinEx(session.Query.All().Where(it => it.Description == null),
o => o.Id,
key,
(o, i) => o)
@@ -78,7 +78,7 @@ public void LeftJoinOneVariableUsage()
Assert.That(leftJoinWithExpression.Count, Is.EqualTo(3));
leftJoinWithExpression = session.Query.All()
- .LeftOuterJoin(session.Query.All().Where(it => it.Description == null),
+ .LeftJoinEx(session.Query.All().Where(it => it.Description == null),
key,
i => i.Id,
(o, i) => o)
@@ -101,7 +101,7 @@ public void LeftJoinTwoVariableUsage()
var ex = Assert.Throws(() =>
_ = session.Query.All()
- .LeftOuterJoin(session.Query.All().Where(it => it.Description == null),
+ .LeftJoinEx(session.Query.All().Where(it => it.Description == null),
key,
key,
(o, i) => o)
diff --git a/Orm/Xtensive.Orm.Tests/Linq/CustomExpressionCompilers.cs b/Orm/Xtensive.Orm.Tests/Linq/CustomExpressionCompilers.cs
index 48e8dc4c6..e1ee52b5d 100644
--- a/Orm/Xtensive.Orm.Tests/Linq/CustomExpressionCompilers.cs
+++ b/Orm/Xtensive.Orm.Tests/Linq/CustomExpressionCompilers.cs
@@ -142,10 +142,11 @@ public void MainTest()
var expected1 = session.Query.All().AsEnumerable().OrderBy(p => p.Id).Select(p => p.Fullname).ToList();
Assert.That(expected1.Count, Is.GreaterThan(0));
var fullNames1 = session.Query.All().OrderBy(p => p.Id).Select(p => p.Fullname).ToList();
- Assert.That(expected1, Is.EqualTo(fullNames1));
+ Assert.That(expected1.SequenceEqual(fullNames1), Is.True);
+
var expected2 = session.Query.All().AsEnumerable().OrderBy(p => p.Id).Select(p => p.AddPrefix("Mr. ")).ToList();
var fullNames2 = session.Query.All().OrderBy(p => p.Id).Select(p => p.AddPrefix("Mr. ")).ToList();
- Assert.That(expected2, Is.EqualTo(fullNames2));
+ Assert.That(expected2.SequenceEqual(fullNames2), Is.True);
// Rollback
}
}
diff --git a/Orm/Xtensive.Orm.Tests/Linq/DynamicallyDefinedFields.cs b/Orm/Xtensive.Orm.Tests/Linq/DynamicallyDefinedFields.cs
index 24ea3bd9b..8e7ae24d2 100644
--- a/Orm/Xtensive.Orm.Tests/Linq/DynamicallyDefinedFields.cs
+++ b/Orm/Xtensive.Orm.Tests/Linq/DynamicallyDefinedFields.cs
@@ -1260,7 +1260,7 @@ public void LeftJoinTest()
using (session.Activate())
using (var transction = session.OpenTransaction()) {
Assert.DoesNotThrow(() => {
- session.Query.All().LeftOuterJoin(session.Query.All(), area => (Group)area[testData.GroupFieldName],
+ session.Query.All().LeftJoinEx(session.Query.All(), area => (Group)area[testData.GroupFieldName],
group => group, (area, @group) => new { Area = area, Group = group });
});
}
diff --git a/Orm/Xtensive.Orm.Tests/Linq/FullTextColumnsDeclarationTest.cs b/Orm/Xtensive.Orm.Tests/Linq/FullTextColumnsDeclarationTest.cs
index 579c0c832..7a45d6d5f 100644
--- a/Orm/Xtensive.Orm.Tests/Linq/FullTextColumnsDeclarationTest.cs
+++ b/Orm/Xtensive.Orm.Tests/Linq/FullTextColumnsDeclarationTest.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
diff --git a/Orm/Xtensive.Orm.Tests/Linq/InTest.cs b/Orm/Xtensive.Orm.Tests/Linq/InTest.cs
index 4f0069848..ac66f1462 100644
--- a/Orm/Xtensive.Orm.Tests/Linq/InTest.cs
+++ b/Orm/Xtensive.Orm.Tests/Linq/InTest.cs
@@ -76,7 +76,7 @@ public async Task StringContainsAsyncTest()
public void MartinTest()
{
_ = Session.Query.All()
- .LeftOuterJoin(Session.Query.All(), c => c, i => i.Customer, (c, i) => new { Customer = c, Invoice = i })
+ .LeftJoinEx(Session.Query.All(), c => c, i => i.Customer, (c, i) => new { Customer = c, Invoice = i })
.GroupBy(i => new { i.Customer.FirstName, i.Customer.LastName })
.Select(g => new { Key = g.Key, Count = g.Count(j => j.Invoice != null) })
.ToList();
diff --git a/Orm/Xtensive.Orm.Tests/Linq/JoinTest.cs b/Orm/Xtensive.Orm.Tests/Linq/JoinTest.cs
index efff17fc2..292e3d993 100644
--- a/Orm/Xtensive.Orm.Tests/Linq/JoinTest.cs
+++ b/Orm/Xtensive.Orm.Tests/Linq/JoinTest.cs
@@ -143,7 +143,7 @@ public void SimpleLeftTest()
{
var traclCount = Session.Query.All
/// of items to be stored in queue.
/// of priority value.
+ [Obsolete]
public interface IPriorityQueue :
IEnumerable, ICloneable
where TPriority : IComparable
diff --git a/Orm/Xtensive.Orm/Collections/TypeRegistry.cs b/Orm/Xtensive.Orm/Collections/TypeRegistry.cs
index 87a1b11dc..7f2f17624 100644
--- a/Orm/Xtensive.Orm/Collections/TypeRegistry.cs
+++ b/Orm/Xtensive.Orm/Collections/TypeRegistry.cs
@@ -147,14 +147,14 @@ public override void Lock(bool recursive)
#region ICloneable members
+ ///
+ object ICloneable.Clone() => Clone();
+
///
/// Clones this instance.
///
///
- public virtual object Clone()
- {
- return new TypeRegistry(this);
- }
+ public virtual TypeRegistry Clone() => new TypeRegistry(this);
#endregion
diff --git a/Orm/Xtensive.Orm/Comparison/AdvancedComparerBase.cs b/Orm/Xtensive.Orm/Comparison/AdvancedComparerBase.cs
index 4ad7c9faa..9e3bc60e9 100644
--- a/Orm/Xtensive.Orm/Comparison/AdvancedComparerBase.cs
+++ b/Orm/Xtensive.Orm/Comparison/AdvancedComparerBase.cs
@@ -159,7 +159,7 @@ public AdvancedComparerBase(IComparerProvider provider, ComparisonRules comparis
false, default(T),
false, default(T),
false, default(T));
- this.provider = provider;
+ this.provider = provider ?? throw new ArgumentNullException(nameof(provider));
ComparisonRules = comparisonRules;
DefaultDirectionMultiplier = comparisonRules.Value.Direction == Direction.Negative ? -1 : 1;
}
diff --git a/Orm/Xtensive.Orm/Comparison/CastingComparer.cs b/Orm/Xtensive.Orm/Comparison/CastingComparer.cs
index 77033a2e5..b97c95dec 100644
--- a/Orm/Xtensive.Orm/Comparison/CastingComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/CastingComparer.cs
@@ -40,7 +40,7 @@ public AsymmetricCompareHandler(Func baseCompare)
private readonly AdvancedComparer sourceComparer;
///
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
+ protected override CastingComparer CreateNew(ComparisonRules rules)
=> new CastingComparer(sourceComparer.ApplyRules(rules));
///
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/ArrayComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/ArrayComparer.cs
index e775b0673..e8a04998d 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/ArrayComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/ArrayComparer.cs
@@ -13,8 +13,7 @@ namespace Xtensive.Comparison
internal sealed class ArrayComparer : WrappingComparer,
ISystemComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new ArrayComparer(Provider, ComparisonRules.Combine(rules));
+ protected override ArrayComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
public override int Compare(T[] x, T[] y)
{
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/AssemblyComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/AssemblyComparer.cs
index af3e73747..52f34e71d 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/AssemblyComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/AssemblyComparer.cs
@@ -14,8 +14,7 @@ namespace Xtensive.Comparison
internal sealed class AssemblyComparer: WrappingComparer,
ISystemComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new AssemblyComparer(Provider, ComparisonRules.Combine(rules));
+ protected override AssemblyComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
public override int Compare(Assembly x, Assembly y)
{
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/BaseComparerWrapper.cs b/Orm/Xtensive.Orm/Comparison/Internals/BaseComparerWrapper.cs
index ef4e624db..3c9e8be56 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/BaseComparerWrapper.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/BaseComparerWrapper.cs
@@ -14,8 +14,7 @@ namespace Xtensive.Comparison
internal class BaseComparerWrapper: WrappingComparer
where T: TBase
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new BaseComparerWrapper(Provider, ComparisonRules.Combine(rules));
+ protected override BaseComparerWrapper CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
public override int Compare(T x, T y) => BaseComparer.Compare(x, y);
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/BooleanComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/BooleanComparer.cs
index 0b5fd6ad6..153784f94 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/BooleanComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/BooleanComparer.cs
@@ -14,7 +14,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class BooleanComparer : ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules) => new BooleanComparer(Provider, ComparisonRules.Combine(rules));
+ protected override BooleanComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
public override bool GetNearestValue(bool value, Direction direction)
{
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/ByteComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/ByteComparer.cs
index ebef97031..f6a6b834e 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/ByteComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/ByteComparer.cs
@@ -12,8 +12,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class ByteComparer : ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new ByteComparer(Provider, ComparisonRules.Combine(rules));
+ protected override ByteComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
// Constructors
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/CharComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/CharComparer.cs
index 6a2eca9ed..136524c2f 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/CharComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/CharComparer.cs
@@ -12,8 +12,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class CharComparer : ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new CharComparer(Provider, ComparisonRules.Combine(rules));
+ protected override CharComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
// Constructors
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/DecimalComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/DecimalComparer.cs
index 2190b2c79..579df40e2 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/DecimalComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/DecimalComparer.cs
@@ -12,8 +12,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class DecimalComparer : ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new DecimalComparer(Provider, ComparisonRules.Combine(rules));
+ protected override DecimalComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
// Constructors
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/DoubleComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/DoubleComparer.cs
index 7d8fe1167..1a686c910 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/DoubleComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/DoubleComparer.cs
@@ -12,8 +12,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class DoubleComparer : ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new DoubleComparer(Provider, ComparisonRules.Combine(rules));
+ protected override DoubleComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
// Constructors
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/EnumComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/EnumComparer.cs
index fd904619e..d0c7dd0a5 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/EnumComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/EnumComparer.cs
@@ -26,8 +26,7 @@ internal sealed class EnumComparer : WrappingComparer valueToIndex;
private readonly int maxIndex;
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new EnumComparer(Provider, ComparisonRules.Combine(rules));
+ protected override EnumComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
public override int Compare(TEnum x, TEnum y) => BaseComparer.Compare(EnumToSystem(x), EnumToSystem(y));
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/EnumerableInterfaceComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/EnumerableInterfaceComparer.cs
index af5896047..eca2e7de7 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/EnumerableInterfaceComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/EnumerableInterfaceComparer.cs
@@ -15,8 +15,8 @@ internal sealed class EnumerableInterfaceComparer : WrappingComp
ISystemComparer
where TEnumerable: class, IEnumerable
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new EnumerableInterfaceComparer(Provider, ComparisonRules.Combine(rules));
+ protected override EnumerableInterfaceComparer CreateNew(ComparisonRules rules)
+ => new(Provider, ComparisonRules.Combine(rules));
public override int Compare(TEnumerable x, TEnumerable y)
{
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/GuidComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/GuidComparer.cs
index 42271594d..63be565e9 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/GuidComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/GuidComparer.cs
@@ -12,8 +12,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class GuidComparer: ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new GuidComparer(Provider, ComparisonRules.Combine(rules));
+ protected override GuidComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
// Constructors
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/Int16Comparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/Int16Comparer.cs
index fe10bc585..6ddd8d06b 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/Int16Comparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/Int16Comparer.cs
@@ -12,8 +12,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class Int16Comparer : ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new Int16Comparer(Provider, ComparisonRules.Combine(rules));
+ protected override Int16Comparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
// Constructors
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/Int32Comparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/Int32Comparer.cs
index bbe22f1d0..9e77defa4 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/Int32Comparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/Int32Comparer.cs
@@ -12,7 +12,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class Int32Comparer : ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules) => new Int32Comparer(Provider, ComparisonRules.Combine(rules));
+ protected override Int32Comparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
// Constructors
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/Int64Comparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/Int64Comparer.cs
index 50dfb9d1c..df62ffc00 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/Int64Comparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/Int64Comparer.cs
@@ -12,8 +12,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class Int64Comparer : ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new Int64Comparer(Provider, ComparisonRules.Combine(rules));
+ protected override Int64Comparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
// Constructors
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/KeyValuePairComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/KeyValuePairComparer.cs
index c61ff9bf5..b691600c5 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/KeyValuePairComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/KeyValuePairComparer.cs
@@ -15,8 +15,7 @@ namespace Xtensive.Comparison
internal sealed class KeyValuePairComparer: WrappingComparer, T1, T2>,
ISystemComparer>
{
- protected override IAdvancedComparer> CreateNew(ComparisonRules rules)
- => new KeyValuePairComparer(Provider, ComparisonRules.Combine(rules));
+ protected override KeyValuePairComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
public override int Compare(KeyValuePair x, KeyValuePair y)
{
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/NullableComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/NullableComparer.cs
index 935248b46..4727b41a0 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/NullableComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/NullableComparer.cs
@@ -23,8 +23,7 @@ internal sealed class NullableComparer: WrappingComparer
private Func currentBaseGetHashCode;
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new NullableComparer(Provider, ComparisonRules.Combine(rules));
+ protected override NullableComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
public override int Compare(T? x, T? y)
{
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/ObjectComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/ObjectComparer.cs
index f53972f32..9c6d5da60 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/ObjectComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/ObjectComparer.cs
@@ -20,8 +20,7 @@ internal sealed class ObjectComparer: AdvancedComparerBase
[NonSerialized]
private int nullHashCode;
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new ObjectComparer(Provider, ComparisonRules.Combine(rules));
+ protected override ObjectComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
public override int Compare(T x, T y)
{
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/SByteComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/SByteComparer.cs
index 720d62b58..5ae937bbf 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/SByteComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/SByteComparer.cs
@@ -12,8 +12,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class SByteComparer : ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new SByteComparer(Provider, ComparisonRules.Combine(rules));
+ protected override SByteComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
// Constructors
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/SingleComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/SingleComparer.cs
index a7c901bbe..f6b790a9e 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/SingleComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/SingleComparer.cs
@@ -12,8 +12,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class SingleComparer : ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new SingleComparer(Provider, ComparisonRules.Combine(rules));
+ protected override SingleComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
// Constructors
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/StringComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/StringComparer.cs
index 006eacfcf..aa749126f 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/StringComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/StringComparer.cs
@@ -22,10 +22,7 @@ internal sealed class StringComparer: AdvancedComparerBase,
[NonSerialized]
private Func stringIsSuffix;
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- {
- return new StringComparer(Provider, ComparisonRules.Combine(rules));
- }
+ protected override StringComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
public override int Compare(string x, string y)
{
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/TupleComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/TupleComparer.cs
index 98fd93171..6b3f54a02 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/TupleComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/TupleComparer.cs
@@ -17,8 +17,7 @@ internal sealed class TupleComparer : AdvancedComparerBase,
[NonSerialized]
private int nullHashCode;
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new TupleComparer(Provider, ComparisonRules.Combine(rules));
+ protected override TupleComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
public override int Compare(Tuple x, Tuple y)
=> throw new NotSupportedException();
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/TupleDescriptorComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/TupleDescriptorComparer.cs
index 8252629eb..d1c17f341 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/TupleDescriptorComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/TupleDescriptorComparer.cs
@@ -19,8 +19,7 @@ namespace Xtensive.Comparison
internal sealed class TupleDescriptorComparer: WrappingComparer,
ISystemComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new TupleDescriptorComparer(Provider, ComparisonRules.Combine(rules));
+ protected override TupleDescriptorComparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
public override int Compare(TupleDescriptor x, TupleDescriptor y) => throw new NotSupportedException();
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/TypeComparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/TypeComparer.cs
index ada19dc97..118291666 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/TypeComparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/TypeComparer.cs
@@ -21,8 +21,7 @@ internal sealed class TypeComparer: WrappingComparer,
[NonSerialized]
private ConcurrentDictionary<(Type, Type, TypeComparer), int> results;
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new TypeComparer(Provider, ComparisonRules.Combine(rules));
+ protected override TypeComparer CreateNew(ComparisonRules rules) => new TypeComparer(Provider, ComparisonRules.Combine(rules));
public override int Compare(Type x, Type y)
{
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/UInt16Comparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/UInt16Comparer.cs
index 19c230f0f..750ba0171 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/UInt16Comparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/UInt16Comparer.cs
@@ -12,8 +12,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class UInt16Comparer : ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new UInt16Comparer(Provider, ComparisonRules.Combine(rules));
+ protected override UInt16Comparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
// Constructors
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/UInt32Comparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/UInt32Comparer.cs
index 31c0fecb5..37522d85d 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/UInt32Comparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/UInt32Comparer.cs
@@ -12,8 +12,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class UInt32Comparer : ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new UInt32Comparer(Provider, ComparisonRules.Combine(rules));
+ protected override UInt32Comparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
// Constructors
diff --git a/Orm/Xtensive.Orm/Comparison/Internals/UInt64Comparer.cs b/Orm/Xtensive.Orm/Comparison/Internals/UInt64Comparer.cs
index 5fc58bfe5..e928554ff 100644
--- a/Orm/Xtensive.Orm/Comparison/Internals/UInt64Comparer.cs
+++ b/Orm/Xtensive.Orm/Comparison/Internals/UInt64Comparer.cs
@@ -12,8 +12,7 @@ namespace Xtensive.Comparison
[Serializable]
internal sealed class UInt64Comparer : ValueTypeComparer
{
- protected override IAdvancedComparer CreateNew(ComparisonRules rules)
- => new UInt64Comparer(Provider, ComparisonRules.Combine(rules));
+ protected override UInt64Comparer CreateNew(ComparisonRules rules) => new(Provider, ComparisonRules.Combine(rules));
// Constructors
diff --git a/Orm/Xtensive.Orm/Conversion/Internals/NullableForwardAdvancedConverter.cs b/Orm/Xtensive.Orm/Conversion/Internals/NullableForwardAdvancedConverter.cs
index c494ef258..2a41fa4b1 100644
--- a/Orm/Xtensive.Orm/Conversion/Internals/NullableForwardAdvancedConverter.cs
+++ b/Orm/Xtensive.Orm/Conversion/Internals/NullableForwardAdvancedConverter.cs
@@ -18,7 +18,7 @@ internal sealed class NullableForwardAdvancedConverter : WrappingAdv
public override TTo Convert(TFrom? value)
{
if (toIsValueType && !value.HasValue)
- throw new ArgumentNullException("value");
+ throw new ArgumentNullException(nameof(value));
return BaseConverter.Convert(value.GetValueOrDefault());
}
diff --git a/Orm/Xtensive.Orm/Core/Extensions/CollectionExtensions.cs b/Orm/Xtensive.Orm/Core/Extensions/CollectionExtensions.cs
index 872fc604d..aac676773 100644
--- a/Orm/Xtensive.Orm/Core/Extensions/CollectionExtensions.cs
+++ b/Orm/Xtensive.Orm/Core/Extensions/CollectionExtensions.cs
@@ -34,9 +34,9 @@ public static void Copy(this ICollection source, TItem[] target, i
ArgumentNullException.ThrowIfNull(source);
ArgumentNullException.ThrowIfNull(target);
if (targetIndex < 0 || targetIndex > target.Length)
- throw new ArgumentOutOfRangeException("targetIndex");
+ throw new ArgumentOutOfRangeException(nameof(targetIndex));
if ((target.Length - targetIndex) < source.Count)
- throw new ArgumentException(Strings.ExDestionationArrayIsTooSmall, "target");
+ throw new ArgumentException(Strings.ExDestionationArrayIsTooSmall, nameof(target));
foreach (TItem item in source)
target[targetIndex++] = item;
@@ -58,11 +58,11 @@ public static void Copy(this ICollection source, Array target, int
ArgumentNullException.ThrowIfNull(source);
ArgumentNullException.ThrowIfNull(target);
if (targetIndex < 0 || targetIndex > target.Length)
- throw new ArgumentOutOfRangeException("targetIndex");
+ throw new ArgumentOutOfRangeException(nameof(targetIndex));
if ((target.Length - targetIndex) < source.Count)
- throw new ArgumentException(Strings.ExDestionationArrayIsTooSmall, "target");
+ throw new ArgumentException(Strings.ExDestionationArrayIsTooSmall, nameof(target));
if (target.Rank != 1)
- throw new ArgumentException(Strings.ExArrayIsMultidimensional, "target");
+ throw new ArgumentException(Strings.ExArrayIsMultidimensional, nameof(target));
// if (target.GetType().GetElementType().IsAssignableFrom(typeof(T)))
// throw new ArgumentException(Strings.ExIncompatibleArrayType, "target");
diff --git a/Orm/Xtensive.Orm/Core/Extensions/ExpressionExtensions.cs b/Orm/Xtensive.Orm/Core/Extensions/ExpressionExtensions.cs
index 18e6ef4da..8cc0068e3 100644
--- a/Orm/Xtensive.Orm/Core/Extensions/ExpressionExtensions.cs
+++ b/Orm/Xtensive.Orm/Core/Extensions/ExpressionExtensions.cs
@@ -178,7 +178,7 @@ public static MemberInfo GetMember(this Expression expression)
var me = expression as MemberExpression;
if (me==null)
throw new ArgumentException(
- string.Format(Strings.ExInvalidArgumentType, typeof (MemberExpression)), "expression");
+ string.Format(Strings.ExInvalidArgumentType, typeof (MemberExpression)), nameof(expression));
return me.Member;
}
@@ -227,7 +227,7 @@ public static MethodInfo GetMethod(this Expression expression)
var mce = expression as MethodCallExpression;
if (mce==null)
throw new ArgumentException(
- string.Format(Strings.ExInvalidArgumentType, typeof (MethodCallExpression)), "expression");
+ string.Format(Strings.ExInvalidArgumentType, typeof (MethodCallExpression)), nameof(expression));
return mce.Method;
}
@@ -244,7 +244,7 @@ public static PropertyInfo GetIndexer(this Expression expression)
var ie = expression as IndexExpression;
if (ie==null)
throw new ArgumentException(
- string.Format(Strings.ExInvalidArgumentType, typeof (IndexExpression)), "expression");
+ string.Format(Strings.ExInvalidArgumentType, typeof (IndexExpression)), nameof(expression));
return ie.Indexer;
}
@@ -261,7 +261,7 @@ public static ConstructorInfo GetConstructor(this Expression expression)
var ne = expression as NewExpression;
if (ne==null)
throw new ArgumentException(
- string.Format(Strings.ExInvalidArgumentType, typeof (NewExpression)), "expression");
+ string.Format(Strings.ExInvalidArgumentType, typeof (NewExpression)), nameof(expression));
return ne.Constructor;
}
diff --git a/Orm/Xtensive.Orm/Core/Extensions/ListExtensions.cs b/Orm/Xtensive.Orm/Core/Extensions/ListExtensions.cs
index d0c24d4b0..af53e270c 100644
--- a/Orm/Xtensive.Orm/Core/Extensions/ListExtensions.cs
+++ b/Orm/Xtensive.Orm/Core/Extensions/ListExtensions.cs
@@ -59,9 +59,9 @@ public static void Copy(this IList source, TItem[] target, int tar
ArgumentNullException.ThrowIfNull(source);
ArgumentNullException.ThrowIfNull(target);
if (targetIndex < 0 || targetIndex > target.Length)
- throw new ArgumentOutOfRangeException("targetIndex");
+ throw new ArgumentOutOfRangeException(nameof(targetIndex));
if ((target.Length - targetIndex) < source.Count)
- throw new ArgumentException(Strings.ExDestionationArrayIsTooSmall, "target");
+ throw new ArgumentException(Strings.ExDestionationArrayIsTooSmall, nameof(target));
int count = source.Count;
for (int i = 0; i < count; i++)
@@ -84,11 +84,11 @@ public static void Copy(this IList source, Array target, int targe
ArgumentNullException.ThrowIfNull(source);
ArgumentNullException.ThrowIfNull(target);
if (targetIndex < 0 || targetIndex > target.Length)
- throw new ArgumentOutOfRangeException("targetIndex");
+ throw new ArgumentOutOfRangeException(nameof(targetIndex));
if ((target.Length - targetIndex) < source.Count)
- throw new ArgumentException(Strings.ExDestionationArrayIsTooSmall, "target");
+ throw new ArgumentException(Strings.ExDestionationArrayIsTooSmall, nameof(target));
if (target.Rank != 1)
- throw new ArgumentException(Strings.ExArrayIsMultidimensional, "target");
+ throw new ArgumentException(Strings.ExArrayIsMultidimensional, nameof(target));
// if (target.GetType().GetElementType().IsAssignableFrom(typeof(T)))
// throw new ArgumentException(Strings.ExIncompatibleArrayType, "target");
diff --git a/Orm/Xtensive.Orm/Core/Extensions/StringBuilderExtensions.cs b/Orm/Xtensive.Orm/Core/Extensions/StringBuilderExtensions.cs
index 51b56a2e7..723c46a80 100644
--- a/Orm/Xtensive.Orm/Core/Extensions/StringBuilderExtensions.cs
+++ b/Orm/Xtensive.Orm/Core/Extensions/StringBuilderExtensions.cs
@@ -16,6 +16,7 @@ namespace Xtensive.Core
public static class StringBuilderExtensions
{
private const char IndentChar = ' ';
+ private const string LowerHexChars = "0123456789abcdef";
///
/// Appends the specified indented by specified count of spaces.
@@ -79,10 +80,9 @@ public static StringBuilder AppendHexArray(this StringBuilder builder, byte[] va
ArgumentNullException.ThrowIfNull(builder);
ArgumentNullException.ThrowIfNull(values);
- const string lowerHexChars = "0123456789abcdef";
foreach (var item in values) {
- _ = builder.Append(lowerHexChars[item >> 4])
- .Append(lowerHexChars[item & 0xF]);
+ _ = builder.Append(LowerHexChars[item >> 4])
+ .Append(LowerHexChars[item & 0xF]);
}
return builder;
}
@@ -99,10 +99,9 @@ public static StringBuilder AppendHexArray(this StringBuilder builder, in ReadOn
{
ArgumentNullException.ThrowIfNull(builder);
- const string lowerHexChars = "0123456789abcdef";
foreach (var item in values) {
- _ = builder.Append(lowerHexChars[item >> 4])
- .Append(lowerHexChars[item & 0xF]);
+ _ = builder.Append(LowerHexChars[item >> 4])
+ .Append(LowerHexChars[item & 0xF]);
}
return builder;
}
diff --git a/Orm/Xtensive.Orm/Core/Extensions/TaskExtensions.cs b/Orm/Xtensive.Orm/Core/Extensions/TaskExtensions.cs
index 56f914768..d592011f0 100644
--- a/Orm/Xtensive.Orm/Core/Extensions/TaskExtensions.cs
+++ b/Orm/Xtensive.Orm/Core/Extensions/TaskExtensions.cs
@@ -1,30 +1,26 @@
-using System;
-using System.Collections.Generic;
using System.Runtime.CompilerServices;
-using System.Threading.Tasks;
-namespace Xtensive.Core
+namespace Xtensive.Core;
+
+public static class TaskExtensions
{
- public static class TaskExtensions
- {
#if DO_CONFIGURE_AWAIT_FALSE
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredTaskAwaitable ConfigureAwaitFalse(this Task task) => task.ConfigureAwait(false);
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredTaskAwaitable ConfigureAwaitFalse(this Task task) => task.ConfigureAwait(false);
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredValueTaskAwaitable ConfigureAwaitFalse(this ValueTask task) => task.ConfigureAwait(false);
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredValueTaskAwaitable ConfigureAwaitFalse(this ValueTask task) => task.ConfigureAwait(false);
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredAsyncDisposable ConfigureAwaitFalse(this IAsyncDisposable source) => source.ConfigureAwait(false);
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredCancelableAsyncEnumerable ConfigureAwaitFalse(this IAsyncEnumerable source) => source.ConfigureAwait(false);
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredAsyncDisposable ConfigureAwaitFalse(this T source) where T: struct, IAsyncDisposable => source.ConfigureAwait(false);;
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredCancelableAsyncEnumerable ConfigureAwaitFalse(this ConfiguredCancelableAsyncEnumerable source) => source.ConfigureAwait(false);
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredTaskAwaitable ConfigureAwaitFalse(this Task task) => task.ConfigureAwait(false);
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredTaskAwaitable ConfigureAwaitFalse(this Task task) => task.ConfigureAwait(false);
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredValueTaskAwaitable ConfigureAwaitFalse(this ValueTask task) => task.ConfigureAwait(false);
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredValueTaskAwaitable ConfigureAwaitFalse(this ValueTask task) => task.ConfigureAwait(false);
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredAsyncDisposable ConfigureAwaitFalse(this IAsyncDisposable source) => source.ConfigureAwait(false);
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredCancelableAsyncEnumerable ConfigureAwaitFalse(this IAsyncEnumerable source) => source.ConfigureAwait(false);
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredAsyncDisposable ConfigureAwaitFalse(this T source) where T: struct, IAsyncDisposable => source.ConfigureAwait(false);;
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredCancelableAsyncEnumerable ConfigureAwaitFalse(this ConfiguredCancelableAsyncEnumerable source) => source.ConfigureAwait(false);
#else
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Task ConfigureAwaitFalse(this Task task) => task;
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Task ConfigureAwaitFalse(this Task task) => task;
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ValueTask ConfigureAwaitFalse(this ValueTask task) => task;
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ValueTask ConfigureAwaitFalse(this ValueTask task) => task;
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static IAsyncDisposable ConfigureAwaitFalse(this IAsyncDisposable source) => source;
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static IAsyncEnumerable ConfigureAwaitFalse(this IAsyncEnumerable source) => source;
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T ConfigureAwaitFalse(this T source) where T: struct, IAsyncDisposable => source;
- [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredCancelableAsyncEnumerable ConfigureAwaitFalse(this ConfiguredCancelableAsyncEnumerable source) => source;
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Task ConfigureAwaitFalse(this Task task) => task;
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Task ConfigureAwaitFalse(this Task task) => task;
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ValueTask ConfigureAwaitFalse(this ValueTask task) => task;
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ValueTask ConfigureAwaitFalse(this ValueTask task) => task;
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static IAsyncDisposable ConfigureAwaitFalse(this IAsyncDisposable source) => source;
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static IAsyncEnumerable ConfigureAwaitFalse(this IAsyncEnumerable source) => source;
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static T ConfigureAwaitFalse(this T source) where T: struct, IAsyncDisposable => source;
+ [MethodImpl(MethodImplOptions.AggressiveInlining)] public static ConfiguredCancelableAsyncEnumerable ConfigureAwaitFalse(this ConfiguredCancelableAsyncEnumerable source) => source;
#endif
- }
}
diff --git a/Orm/Xtensive.Orm/Core/Parameter.cs b/Orm/Xtensive.Orm/Core/Parameter.cs
index 7ea6ab45d..1dac4472d 100644
--- a/Orm/Xtensive.Orm/Core/Parameter.cs
+++ b/Orm/Xtensive.Orm/Core/Parameter.cs
@@ -4,6 +4,7 @@
// Created by: Alex Kofman
// Created: 2008.08.14
+using System;
using System.Diagnostics;
diff --git a/Orm/Xtensive.Orm/Core/Segment.cs b/Orm/Xtensive.Orm/Core/Segment.cs
index 15dc56ade..4865da7dc 100644
--- a/Orm/Xtensive.Orm/Core/Segment.cs
+++ b/Orm/Xtensive.Orm/Core/Segment.cs
@@ -44,26 +44,26 @@ public T EndOffset {
}
///
- public bool Equals((T, T) other)
+ public bool Equals(Segment other)
{
- return AdvancedComparerStruct.System.Equals(Offset, other.Item1) &&
- AdvancedComparerStruct.System.Equals(Length, other.Item2);
+ return AdvancedComparerStruct.System.Equals(Offset, other.Offset) &&
+ AdvancedComparerStruct.System.Equals(Length, other.Length);
}
///
- public int CompareTo((T, T) other)
+ public int CompareTo(Segment other)
{
- int result = AdvancedComparerStruct.System.Compare(Offset, other.Item1);
+ int result = AdvancedComparerStruct.System.Compare(Offset, other.Offset);
if (result!=0)
return result;
- return AdvancedComparerStruct.System.Compare(Length, other.Item2);
+ return AdvancedComparerStruct.System.Compare(Length, other.Length);
}
#region Equals, GetHashCode
///
public override bool Equals(object obj) =>
- obj is ValueTuple other && Equals(other);
+ obj is Segment other && Equals(other);
///
public override int GetHashCode() => HashCode.Combine(Offset, Length);
diff --git a/Orm/Xtensive.Orm/Core/SimpleXmlSerializer.cs b/Orm/Xtensive.Orm/Core/SimpleXmlSerializer.cs
index 303ccf1af..d53f9fa62 100644
--- a/Orm/Xtensive.Orm/Core/SimpleXmlSerializer.cs
+++ b/Orm/Xtensive.Orm/Core/SimpleXmlSerializer.cs
@@ -4,6 +4,7 @@
// Created by: Denis Krjuchkov
// Created: 2013.07.18
+using System;
using System.IO;
using System.Text;
using System.Xml;
@@ -32,7 +33,7 @@ public sealed class SimpleXmlSerializer
/// Deserialized instance.
public T Deserialize(string value)
{
- ArgumentNullException.ThrowIfNull(value, "serialized");
+ ArgumentNullException.ThrowIfNull(value);
using StringReader reader = new(value);
return (T) serializer.Deserialize(reader);
diff --git a/Orm/Xtensive.Orm/Core/SynchronousFutureResult.cs b/Orm/Xtensive.Orm/Core/SynchronousFutureResult.cs
index 994ee49de..a9c9c21ee 100644
--- a/Orm/Xtensive.Orm/Core/SynchronousFutureResult.cs
+++ b/Orm/Xtensive.Orm/Core/SynchronousFutureResult.cs
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2020 Xtensive LLC.
+// Copyright (C) 2014-2020 Xtensive LLC.
// This code is distributed under MIT license terms.
// See the License.txt file in the project root for more information.
// Created by: Denis Krjuchkov
diff --git a/Orm/Xtensive.Orm/IoC/ServiceContainer.cs b/Orm/Xtensive.Orm/IoC/ServiceContainer.cs
index 8f34d651f..55acc79e3 100644
--- a/Orm/Xtensive.Orm/IoC/ServiceContainer.cs
+++ b/Orm/Xtensive.Orm/IoC/ServiceContainer.cs
@@ -179,7 +179,7 @@ public static IServiceContainer Create(Type containerType, object configuration,
ArgumentNullException.ThrowIfNull(containerType);
if (!iServiceContainerType.IsAssignableFrom(containerType))
throw new ArgumentException(string.Format(
- Strings.ExContainerTypeMustImplementX, iServiceContainerType.Name), "containerType");
+ Strings.ExContainerTypeMustImplementX, iServiceContainerType.Name));
Type configurationType = configuration?.GetType(),
parentType = parent?.GetType();
@@ -187,7 +187,7 @@ public static IServiceContainer Create(Type containerType, object configuration,
FindConstructorInvoker(containerType, configurationType, parentType)?.Invoke(configuration, parent)
?? FindConstructorInvoker(containerType, configurationType)?.Invoke(configuration)
?? FindConstructorInvoker(containerType, parentType)?.Invoke(parent)
- ?? throw new ArgumentException(Strings.ExContainerTypeDoesNotProvideASuitableConstructor, "containerType")
+ ?? throw new ArgumentException(Strings.ExContainerTypeDoesNotProvideASuitableConstructor, nameof(containerType))
);
}
diff --git a/Orm/Xtensive.Orm/Linq/ExpressionVisitor.cs b/Orm/Xtensive.Orm/Linq/ExpressionVisitor.cs
index 29c4b3190..59f83d65e 100644
--- a/Orm/Xtensive.Orm/Linq/ExpressionVisitor.cs
+++ b/Orm/Xtensive.Orm/Linq/ExpressionVisitor.cs
@@ -21,7 +21,7 @@ public abstract class ExpressionVisitor(bool isCaching = false) : System.Linq.Ex
{
private readonly Dictionary cache = isCaching ? new() : null;
- protected virtual IEnumerable VisitExpressionList(IReadOnlyList expressions) =>
+ protected virtual IReadOnlyList VisitExpressionList(IReadOnlyList expressions) =>
VisitList(expressions, Visit);
public override Expression Visit(Expression e)
@@ -72,6 +72,24 @@ protected virtual ElementInit VisitElementInitializer(ElementInit initializer)
protected virtual IEnumerable VisitElementInitializerList(ReadOnlyCollection original) =>
VisitList(original, VisitElementInitializer);
+ ///
+ /// Visits the element initializer list.
+ ///
+ /// The original element initializer list.
+ /// Visit result.
+ protected virtual IReadOnlyList VisitElementInitializerList(IReadOnlyList original)
+ {
+ var results = new ElementInit[original.Count];
+ bool isChanged = false;
+ for (int i = 0, n = original.Count; i < n; i++) {
+ var originalIntializer = original[i];
+ ElementInit p = VisitElementInitializer(originalIntializer);
+ results[i] = p;
+ isChanged |= !ReferenceEquals(originalIntializer, p);
+ }
+ return isChanged ? results : original;
+ }
+
///
protected override Expression VisitUnary(UnaryExpression u) =>
u.Update(Visit(u.Operand));
@@ -236,12 +254,12 @@ protected override MemberMemberBinding VisitMemberMemberBinding(MemberMemberBind
///
/// The original binding list.
/// Visit result.
- protected virtual IEnumerable VisitBindingList(ReadOnlyCollection original) =>
+ protected virtual IReadOnlyList VisitBindingList(ReadOnlyCollection original) =>
VisitList(original, VisitBinding);
- public static IEnumerable VisitList(IReadOnlyList original, Func func) where T : class
+ public static IReadOnlyList VisitList(IReadOnlyList original, Func func) where T : class
{
- for (int i = 0, n = original.Count; i < n; ++i) {
+ for (int i = 0, n = original.Count; i < n; i++) {
var originalValue = original[i];
if (func(originalValue) is var p && !ReferenceEquals(p, originalValue)) {
return VisitListIterator(original, func, p, i);
@@ -250,22 +268,41 @@ public static IEnumerable VisitList(IReadOnlyList original, Func
return original;
}
- private static IEnumerable VisitListIterator(IReadOnlyList original, Func func, T p, int pIdx) where T : class
+ private static IReadOnlyList VisitListIterator(IReadOnlyList original, Func func, T p, int pIdx) where T : class
{
+ T[] result = new T[original.Count];
for (var i = 0; i < pIdx; ++i) {
- yield return original[i];
+ result[i] = original[i];
}
- yield return p;
+ result[pIdx] = p;
for (int i = pIdx + 1, n = original.Count; i < n; ++i) {
- yield return func(original[i]);
+ result[i] = func(original[i]);
}
+ return result;
}
+ ///
+ /// Visits the binding list.
+ ///
+ /// The original binding list.
+ /// Visit result.
+ protected virtual IReadOnlyList VisitBindingList(IReadOnlyList original)
+ {
+ var results = new MemberBinding[original.Count];
+ bool isChanged = false;
+ for (int i = 0, n = original.Count; i < n; i++) {
+ var originalBinding = original[i];
+ MemberBinding p = VisitBinding(originalBinding);
+ results[i] = p;
+ isChanged |= !ReferenceEquals(originalBinding, p);
+ }
+ return isChanged ? results : original;
+ }
+
protected override MemberListBinding VisitMemberListBinding(MemberListBinding binding)
{
- var bindingInitializers = binding.Initializers;
- IEnumerable initializers = VisitElementInitializerList(bindingInitializers);
- if (initializers != bindingInitializers)
+ IEnumerable initializers = VisitElementInitializerList((IReadOnlyList) binding.Initializers);
+ if (initializers!=binding.Initializers)
return Expression.ListBind(binding.Member, initializers);
return binding;
}
diff --git a/Orm/Xtensive.Orm/Linq/ExpressionVisitor{TResult}.cs b/Orm/Xtensive.Orm/Linq/ExpressionVisitor{TResult}.cs
index c3348d122..348f5a2a1 100644
--- a/Orm/Xtensive.Orm/Linq/ExpressionVisitor{TResult}.cs
+++ b/Orm/Xtensive.Orm/Linq/ExpressionVisitor{TResult}.cs
@@ -95,6 +95,35 @@ or ExpressionType.LeftShift
return result;
}
+ ///
+ /// Visits the expression list.
+ ///
+ /// The expression list.
+ /// Visit result.
+ protected virtual ReadOnlyCollection VisitExpressionList(ReadOnlyCollection expressions)
+ {
+ var results = new List(expressions.Count);
+ for (int i = 0, n = expressions.Count; i < n; i++) {
+ var p = Visit(expressions[i]);
+ results.Add(p);
+ }
+ return results.AsReadOnly();
+ }
+
+ ///
+ /// Visits the expression list.
+ ///
+ /// The expression list.
+ /// Visit result.
+ protected virtual IReadOnlyList VisitExpressionList(IReadOnlyList expressions)
+ {
+ var results = new TResult[expressions.Count];
+ for (int i = 0, n = expressions.Count; i < n; i++) {
+ results[i] = Visit(expressions[i]);
+ }
+ return results;
+ }
+
///
/// Visits the unknown expression.
///
diff --git a/Orm/Xtensive.Orm/Linq/ExpressionWriter.cs b/Orm/Xtensive.Orm/Linq/ExpressionWriter.cs
index dcff74ab8..babbc4523 100644
--- a/Orm/Xtensive.Orm/Linq/ExpressionWriter.cs
+++ b/Orm/Xtensive.Orm/Linq/ExpressionWriter.cs
@@ -4,12 +4,9 @@
// Created by: Alexey Kochetov
// Created: 2008.11.25
-using System;
using System.Collections;
-using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
-using System.Linq;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
using Xtensive.Core;
@@ -444,8 +441,21 @@ protected override System.Collections.ObjectModel.ReadOnlyCollection
- protected override IReadOnlyList VisitExpressionList(
- IReadOnlyList expressions)
+ protected override IReadOnlyList VisitElementInitializerList(IReadOnlyList original)
+ {
+ for (int i = 0, n = original.Count; i < n; i++) {
+ VisitElementInitializer(original[i]);
+ if (i < n - 1) {
+ Write(",");
+ WriteLine(IndentType.Same);
+ }
+ }
+
+ return original;
+ }
+
+ ///
+ protected override IReadOnlyList VisitExpressionList(IReadOnlyList expressions)
{
for (int i = 0, n = expressions.Count; i < n; i++) {
Visit(expressions[i]);
@@ -578,7 +588,7 @@ protected override MethodCallExpression VisitMethodCall(MethodCallExpression mc)
if (mc.Method.GetAttributes(AttributeSearchOptions.InheritNone).Count > 0) {
// A special case: extension method
Visit(mc.Arguments[0]);
- arguments = new System.Collections.ObjectModel.ReadOnlyCollection(mc.Arguments.Skip(1).ToList());
+ arguments = new System.Collections.ObjectModel.ReadOnlyCollection(mc.Arguments.Skip(1).ToList(mc.Arguments.Count - 1));
}
else {
Write(GetTypeName(mc.Method.DeclaringType));
diff --git a/Orm/Xtensive.Orm/Linq/SerializableExpressions/Internals/ExpressionToSerializableExpressionConverter.cs b/Orm/Xtensive.Orm/Linq/SerializableExpressions/Internals/ExpressionToSerializableExpressionConverter.cs
index df87b52d0..62175aba9 100644
--- a/Orm/Xtensive.Orm/Linq/SerializableExpressions/Internals/ExpressionToSerializableExpressionConverter.cs
+++ b/Orm/Xtensive.Orm/Linq/SerializableExpressions/Internals/ExpressionToSerializableExpressionConverter.cs
@@ -192,53 +192,45 @@ protected override SerializableInvocationExpression VisitInvocation(InvocationEx
#region Private / internal methods
- private SerializableMemberBinding[] VisitMemberBindingSequence(IEnumerable bindings)
- {
- var result = new List();
- foreach (var binding in bindings)
- switch (binding.BindingType) {
- case MemberBindingType.Assignment:
- result.Add(new SerializableMemberAssignment
- {
- BindingType = MemberBindingType.Assignment,
- Member = binding.Member,
- Expression = Visit(((MemberAssignment) binding).Expression)
- });
- break;
- case MemberBindingType.ListBinding:
- result.Add(new SerializableMemberListBinding
- {
- BindingType = MemberBindingType.ListBinding,
- Member = binding.Member,
- Initializers = VisitElementInitSequence(((MemberListBinding) binding).Initializers)
- });
- break;
- case MemberBindingType.MemberBinding:
- result.Add(new SerializableMemberMemberBinding
- {
- BindingType = MemberBindingType.MemberBinding,
- Member = binding.Member,
- Bindings = VisitMemberBindingSequence(((MemberMemberBinding) binding).Bindings)
- });
- break;
- default:
- throw new ArgumentOutOfRangeException();
- }
- return result.ToArray();
- }
-
- private SerializableElementInit[] VisitElementInitSequence(IEnumerable initializers)
+ private SerializableMemberBinding[] VisitMemberBindingSequence(IReadOnlyList bindings)
+ {
+ var arrayResult = new SerializableMemberBinding[bindings.Count];
+ for (int i = 0, count = bindings.Count; i < count; i++) {
+ var binding = bindings[i];
+ arrayResult[i] = binding.BindingType switch {
+ MemberBindingType.Assignment => new SerializableMemberAssignment() {
+ BindingType = MemberBindingType.Assignment,
+ Member = binding.Member,
+ Expression = Visit(((MemberAssignment) binding).Expression)
+ },
+ MemberBindingType.ListBinding => new SerializableMemberListBinding {
+ BindingType = MemberBindingType.ListBinding,
+ Member = binding.Member,
+ Initializers = VisitElementInitSequence(((MemberListBinding) binding).Initializers)
+ },
+ MemberBindingType.MemberBinding => new SerializableMemberMemberBinding {
+ BindingType = MemberBindingType.MemberBinding,
+ Member = binding.Member,
+ Bindings = VisitMemberBindingSequence(((MemberMemberBinding) binding).Bindings)
+ },
+ _ => throw new ArgumentOutOfRangeException()
+
+ };
+ }
+ return arrayResult;
+ }
+
+ private SerializableElementInit[] VisitElementInitSequence(IList initializers)
{
return initializers
.Select(initializer => new SerializableElementInit
{
AddMethod = initializer.AddMethod,
Arguments = VisitExpressionSequence(initializer.Arguments)
- })
- .ToArray();
+ }).ToArray();
}
- private SerializableExpression[] VisitExpressionSequence(IEnumerable expressions)
+ private SerializableExpression[] VisitExpressionSequence(IList expressions)
where T : Expression
{
return expressions.Select(e => Visit(e)).ToArray();
@@ -252,4 +244,4 @@ public ExpressionToSerializableExpressionConverter(Expression source)
this.source = source;
}
}
-}
\ No newline at end of file
+}
diff --git a/Orm/Xtensive.Orm/Linq/SerializableExpressions/Internals/SerializableExpressionToExpressionConverter.cs b/Orm/Xtensive.Orm/Linq/SerializableExpressions/Internals/SerializableExpressionToExpressionConverter.cs
index 2c981cf36..97c83e02a 100644
--- a/Orm/Xtensive.Orm/Linq/SerializableExpressions/Internals/SerializableExpressionToExpressionConverter.cs
+++ b/Orm/Xtensive.Orm/Linq/SerializableExpressions/Internals/SerializableExpressionToExpressionConverter.cs
@@ -9,6 +9,7 @@
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
+using Xtensive.Core;
namespace Xtensive.Linq.SerializableExpressions.Internals
{
@@ -200,7 +201,7 @@ private Expression VisitMethodCall(SerializableMethodCallExpression mc)
private Expression VisitLambda(SerializableLambdaExpression l)
{
- var parameters = l.Parameters.Select(p => (ParameterExpression) Visit(p)).ToList();
+ var parameters = l.Parameters.Select(p => (ParameterExpression) Visit(p)).ToArray();
using (CreateParameterScope(parameters)) {
return FastExpression.Lambda(l.Type, Visit(l.Body), parameters);
}
@@ -319,4 +320,4 @@ public SerializableExpressionToExpressionConverter(SerializableExpression source
parameterScopes = new Stack>();
}
}
-}
\ No newline at end of file
+}
diff --git a/Orm/Xtensive.Orm/Modelling/Comparison/Comparer.cs b/Orm/Xtensive.Orm/Modelling/Comparison/Comparer.cs
index 4f3eb8407..0af7e3873 100644
--- a/Orm/Xtensive.Orm/Modelling/Comparison/Comparer.cs
+++ b/Orm/Xtensive.Orm/Modelling/Comparison/Comparer.cs
@@ -491,7 +491,7 @@ from diff in newDiffs
let nodeDiff = diff as NodeDifference
where nodeDiff!=null && (nodeDiff.MovementInfo & MovementInfo.Changed)!=0
select nodeDiff;
- // query = query.ToList();
+
return query.Any();
}
diff --git a/Orm/Xtensive.Orm/Modelling/Comparison/Upgrader.cs b/Orm/Xtensive.Orm/Modelling/Comparison/Upgrader.cs
index f8333e7ec..7a39e5d7c 100644
--- a/Orm/Xtensive.Orm/Modelling/Comparison/Upgrader.cs
+++ b/Orm/Xtensive.Orm/Modelling/Comparison/Upgrader.cs
@@ -129,7 +129,7 @@ public IReadOnlyList GetUpgradeSequence(Difference difference, HintS
SourceModel = (IModel) difference.Source;
TargetModel = (IModel) difference.Target;
Hints = hints ?? new HintSet(SourceModel, TargetModel);
- Comparer = comparer;
+ Comparer = comparer ?? throw new ArgumentNullException(nameof(comparer));
if (Hints.SourceModel != SourceModel) {
throw new ArgumentOutOfRangeException("hints.SourceModel");
}
diff --git a/Orm/Xtensive.Orm/Modelling/NodeCollection.cs b/Orm/Xtensive.Orm/Modelling/NodeCollection.cs
index 5104edfde..76710a883 100644
--- a/Orm/Xtensive.Orm/Modelling/NodeCollection.cs
+++ b/Orm/Xtensive.Orm/Modelling/NodeCollection.cs
@@ -373,7 +373,7 @@ protected NodeCollection(Node parent, string name)
ArgumentNullException.ThrowIfNull(parent);
ArgumentException.ThrowIfNullOrEmpty(name);
this.name = name;
- this.parent = parent;
+ this.parent = parent ?? throw new ArgumentNullException(nameof(parent));
Initialize();
}
diff --git a/Orm/Xtensive.Orm/Orm/Building/Builders/DomainBuilder.cs b/Orm/Xtensive.Orm/Orm/Building/Builders/DomainBuilder.cs
index b08be911b..0a44205a3 100644
--- a/Orm/Xtensive.Orm/Orm/Building/Builders/DomainBuilder.cs
+++ b/Orm/Xtensive.Orm/Orm/Building/Builders/DomainBuilder.cs
@@ -4,6 +4,7 @@
// Created by: Dmitri Maximov
// Created: 2007.08.03
+using System;
using System.Collections.Generic;
using System.Linq;
using Xtensive.Core;
diff --git a/Orm/Xtensive.Orm/Orm/Building/Builders/ModelBuilder.cs b/Orm/Xtensive.Orm/Orm/Building/Builders/ModelBuilder.cs
index 12504c0de..ff8089a34 100644
--- a/Orm/Xtensive.Orm/Orm/Building/Builders/ModelBuilder.cs
+++ b/Orm/Xtensive.Orm/Orm/Building/Builders/ModelBuilder.cs
@@ -172,7 +172,8 @@ private void BuildPrefetchActions()
foreach (var type in context.Model.Types.Entities) {
var associations = type.GetOwnerAssociations()
.Where(static a => a.OnOwnerRemove is OnRemoveAction.Cascade or OnRemoveAction.Clear);
- if (PrefetchActionContainer.BuildPrefetchAction(type, associations) is { } action) {
+ var action = new PrefetchActionContainer(type).BuildPrefetchAction(associations);
+ if (action != null) {
domain.PrefetchActionMap.Add(type, action);
}
}
diff --git a/Orm/Xtensive.Orm/Orm/Building/Builders/StorageMappingBuilder.cs b/Orm/Xtensive.Orm/Orm/Building/Builders/StorageMappingBuilder.cs
index 867af82e2..70ce5d914 100644
--- a/Orm/Xtensive.Orm/Orm/Building/Builders/StorageMappingBuilder.cs
+++ b/Orm/Xtensive.Orm/Orm/Building/Builders/StorageMappingBuilder.cs
@@ -69,7 +69,7 @@ private readonly Dictionary mappingCache
= new Dictionary();
private readonly bool verbose;
- private readonly List mappingRules;
+ private readonly MappingRule[] mappingRules;
private readonly string defaultDatabase;
private readonly string defaultSchema;
@@ -133,12 +133,16 @@ private static bool RuleMatch(MappingRule rule, Type type)
private StorageMappingBuilder(BuildingContext context)
{
this.context = context;
+ var configuration = context.Configuration;
// Adding a special catch-all rule that maps all types to default schema/database.
-
- mappingRules = context.Configuration.MappingRules
- .Concat(Enumerable.Repeat(new MappingRule(null, null, null, null), 1))
- .ToList();
+ if (configuration.MappingRules.Count == 0)
+ mappingRules = new[] { new MappingRule(null, null, null, null) };
+ else {
+ mappingRules = new MappingRule[context.Configuration.MappingRules.Count + 1];
+ configuration.MappingRules.CopyTo(mappingRules, 0);
+ mappingRules[^1] = new MappingRule(null, null, null, null);
+ }
defaultDatabase = context.Configuration.DefaultDatabase ?? string.Empty;
defaultSchema = context.Configuration.DefaultSchema ?? string.Empty;
diff --git a/Orm/Xtensive.Orm/Orm/Building/FixupActionProcessor.cs b/Orm/Xtensive.Orm/Orm/Building/FixupActionProcessor.cs
index f3b86d026..15efc4809 100644
--- a/Orm/Xtensive.Orm/Orm/Building/FixupActionProcessor.cs
+++ b/Orm/Xtensive.Orm/Orm/Building/FixupActionProcessor.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using Xtensive.Core;
using Xtensive.Orm.Building.Builders;
using Xtensive.Orm.Building.Definitions;
using Xtensive.Orm.Building.DependencyGraph;
@@ -92,9 +93,8 @@ public void Process(BuildGenericTypeInstancesAction action)
var typeSubstitutions = new Type[arguments.Length][];
for (var i = 0; i < arguments.Length; i++) {
var argument = arguments[i];
- var constraints = argument.GetGenericParameterConstraints()
- .ToList();
- if (constraints.Count==0 || !constraints.Any(c => WellKnownOrmInterfaces.Entity.IsAssignableFrom(c)))
+ var constraints = argument.GetGenericParameterConstraints();
+ if (constraints.Length==0 || !constraints.Any(c => WellKnownOrmInterfaces.Entity.IsAssignableFrom(c)))
return; // No IEntity / Entity constraints
var queue = new Queue(
from hierarchy in hierarchies
diff --git a/Orm/Xtensive.Orm/Orm/Building/PrefetchActionContainer.cs b/Orm/Xtensive.Orm/Orm/Building/PrefetchActionContainer.cs
index d265f44e9..e8ed4e832 100644
--- a/Orm/Xtensive.Orm/Orm/Building/PrefetchActionContainer.cs
+++ b/Orm/Xtensive.Orm/Orm/Building/PrefetchActionContainer.cs
@@ -11,20 +11,28 @@
namespace Xtensive.Orm.Building;
[Serializable]
-internal static class PrefetchActionContainer
+internal class PrefetchActionContainer
{
+ private readonly TypeInfo type;
+ private IReadOnlyList fields;
+
// Returns null if associations is empty
- public static Action> BuildPrefetchAction(TypeInfo type, IEnumerable associations)
+ public Action> BuildPrefetchAction(IEnumerable associations)
+ {
+ fields = associations.Select(static association => new PrefetchFieldDescriptor(association.OwnerField, true, false))
+ .ToArray();
+ return fields.Count > 0 ? Prefetch : null;
+ }
+
+ private void Prefetch(SessionHandler sh, IEnumerable keys)
{
- var fields = associations.Select(static association => new PrefetchFieldDescriptor(association.OwnerField, true, false)).ToArray();
- return fields.Length > 0
- ? Prefetch
- : null;
+ foreach (var key in keys)
+ sh.Prefetch(key, type, fields);
+ }
- void Prefetch(SessionHandler sh, IEnumerable keys)
- {
- foreach (var key in keys)
- sh.Prefetch(key, type, fields);
- }
+ public PrefetchActionContainer(TypeInfo type)
+ {
+ this.type = type;
+ fields = Array.Empty();
}
}
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/DatabaseConfigurationCollection.cs b/Orm/Xtensive.Orm/Orm/Configuration/DatabaseConfigurationCollection.cs
index fe9a45729..1536ab043 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/DatabaseConfigurationCollection.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/DatabaseConfigurationCollection.cs
@@ -27,6 +27,12 @@ public IDatabaseConfigurationFlow Add(string name)
}
///
+ object ICloneable.Clone() => Clone();
+
+ ///
+ /// Creates a new object that is a copy of the current instance.
+ ///
+ /// A new object that is a copy of this instance.
public DatabaseConfigurationCollection Clone()
{
var result = new DatabaseConfigurationCollection();
@@ -35,8 +41,6 @@ public DatabaseConfigurationCollection Clone()
return result;
}
- object ICloneable.Clone() => Clone();
-
///
public override void Lock(bool recursive)
{
@@ -47,4 +51,4 @@ public override void Lock(bool recursive)
base.Lock(recursive);
}
}
-}
\ No newline at end of file
+}
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/DomainConfiguration.cs b/Orm/Xtensive.Orm/Orm/Configuration/DomainConfiguration.cs
index 5608aecd5..d99d0d2d8 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/DomainConfiguration.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/DomainConfiguration.cs
@@ -814,7 +814,7 @@ protected override void CopyFrom(ConfigurationBase source)
versioningConvention = configuration.VersioningConvention.Clone();
preferTypeIdsAsQueryParameters = configuration.PreferTypeIdsAsQueryParameters;
maxNumberOfConditons = configuration.MaxNumberOfConditions;
- extensionConfigurations = (ExtensionConfigurationCollection) configuration.ExtensionConfigurations.Clone();
+ extensionConfigurations = configuration.ExtensionConfigurations.Clone();
}
///
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/DomainTypeRegistry.cs b/Orm/Xtensive.Orm/Orm/Configuration/DomainTypeRegistry.cs
index 53542fc35..5040c9615 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/DomainTypeRegistry.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/DomainTypeRegistry.cs
@@ -266,7 +266,7 @@ public static bool IsDbConnectionAccessor(Type type)
#region ICloneable members
///
- public override DomainTypeRegistry Clone() => new(this);
+ public override DomainTypeRegistry Clone() => new DomainTypeRegistry(this);
#endregion
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/ExtensionConfigurationCollection.cs b/Orm/Xtensive.Orm/Orm/Configuration/ExtensionConfigurationCollection.cs
index d0170a29e..d14b3af2e 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/ExtensionConfigurationCollection.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/ExtensionConfigurationCollection.cs
@@ -86,7 +86,7 @@ public override void Lock(bool recursive)
#region ICloneable methods
///
- public object Clone()
+ public ExtensionConfigurationCollection Clone()
{
return new ExtensionConfigurationCollection(this);
}
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/IgnoreRuleCollection.cs b/Orm/Xtensive.Orm/Orm/Configuration/IgnoreRuleCollection.cs
index 4a380b226..9fb739731 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/IgnoreRuleCollection.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/IgnoreRuleCollection.cs
@@ -51,6 +51,12 @@ public IIgnoreRuleConstructionFlow IgnoreIndex(string indexName)
}
///
+ object ICloneable.Clone() => Clone();
+
+ ///
+ /// Creates a new object that is a copy of the current instance.
+ ///
+ /// A new object that is a copy of this instance.
public IgnoreRuleCollection Clone()
{
var result = new IgnoreRuleCollection();
@@ -59,8 +65,6 @@ public IgnoreRuleCollection Clone()
return result;
}
- object ICloneable.Clone() => Clone();
-
///
public override void Lock(bool recursive)
{
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/KeyGeneratorConfigurationCollection.cs b/Orm/Xtensive.Orm/Orm/Configuration/KeyGeneratorConfigurationCollection.cs
index f4f0c6229..0acbca03a 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/KeyGeneratorConfigurationCollection.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/KeyGeneratorConfigurationCollection.cs
@@ -42,6 +42,12 @@ public IKeyGeneratorConfigurationFlow Add()
}
///
+ object ICloneable.Clone() => Clone();
+
+ ///
+ /// Creates a new object that is a copy of the current instance.
+ ///
+ /// A new object that is a copy of this instance.
public KeyGeneratorConfigurationCollection Clone()
{
var result = new KeyGeneratorConfigurationCollection();
@@ -50,7 +56,6 @@ public KeyGeneratorConfigurationCollection Clone()
return result;
}
- object ICloneable.Clone() => Clone();
///
public override void Lock(bool recursive)
{
@@ -61,4 +66,4 @@ public override void Lock(bool recursive)
base.Lock(recursive);
}
}
-}
\ No newline at end of file
+}
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/LinqExtensionRegistration.cs b/Orm/Xtensive.Orm/Orm/Configuration/LinqExtensionRegistration.cs
index 08de1b4f3..4b8f2b466 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/LinqExtensionRegistration.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/LinqExtensionRegistration.cs
@@ -1,4 +1,4 @@
-// Copyright (C) 2011 Xtensive LLC.
+// Copyright (C) 2011 Xtensive LLC.
// All rights reserved.
// For conditions of distribution and use, see license.
// Created by: Denis Krjuchkov
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/LinqExtensionRegistry.cs b/Orm/Xtensive.Orm/Orm/Configuration/LinqExtensionRegistry.cs
index ae76f6d98..cf8197dca 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/LinqExtensionRegistry.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/LinqExtensionRegistry.cs
@@ -78,9 +78,15 @@ IEnumerator IEnumerable.GetEnumerator()
/// Clones this instance.
///
/// Clone of this instance.
- public LinqExtensionRegistry Clone() => new(this);
object ICloneable.Clone() => Clone();
+ ///
+ /// Creates a new object that is a copy of the current instance.
+ ///
+ /// A new object that is a copy of this instance.
+ public LinqExtensionRegistry Clone() => new LinqExtensionRegistry(this);
+
+
// Constructors
///
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/LoggingConfiguration.cs b/Orm/Xtensive.Orm/Orm/Configuration/LoggingConfiguration.cs
index 8f534357e..e43217b2a 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/LoggingConfiguration.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/LoggingConfiguration.cs
@@ -43,12 +43,14 @@ public IList Logs {
public override void Lock(bool recursive)
{
- if (logs is ListnativeList) {
- logs = nativeList.AsReadOnly();
- }
- else {
- logs = logs.ToList().AsReadOnly();
- }
+#if NET8_0_OR_GREATER
+ logs = logs.AsReadOnly();
+#else
+ logs = logs switch {
+ List nativeList1 => nativeList1.AsReadOnly(),
+ _ => logs.ToList().AsReadOnly()
+ };
+#endif
base.Lock(recursive);
foreach (var log in logs) {
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/MappingRuleCollection.cs b/Orm/Xtensive.Orm/Orm/Configuration/MappingRuleCollection.cs
index 9fd5ddde6..6db36a184 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/MappingRuleCollection.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/MappingRuleCollection.cs
@@ -51,6 +51,12 @@ public IMappingRuleConstructionFlow Map(Assembly assembly, string @namespace)
}
///
+ object ICloneable.Clone() => Clone();
+
+ ///
+ /// Creates a new object that is a copy of the current instance.
+ ///
+ /// A new object that is a copy of this instance.
public MappingRuleCollection Clone()
{
var result = new MappingRuleCollection();
@@ -59,8 +65,6 @@ public MappingRuleCollection Clone()
return result;
}
- object ICloneable.Clone() => Clone();
-
///
public override void Lock(bool recursive)
{
@@ -71,4 +75,4 @@ public override void Lock(bool recursive)
base.Lock(recursive);
}
}
-}
\ No newline at end of file
+}
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/NameMappingCollection.cs b/Orm/Xtensive.Orm/Orm/Configuration/NameMappingCollection.cs
index 6819b5020..e51b4898b 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/NameMappingCollection.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/NameMappingCollection.cs
@@ -93,9 +93,14 @@ public IEnumerator> GetEnumerator()
/// Creates clone of this instance.
///
/// Clone of this instance.
- public NameMappingCollection Clone() => new(this);
object ICloneable.Clone() => Clone();
+ ///
+ /// Creates a new object that is a copy of the current instance.
+ ///
+ /// A new object that is a copy of this instance.
+ public NameMappingCollection Clone() => new NameMappingCollection(this);
+
///
/// Initializes new instance of this type.
///
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/NamingConvention.cs b/Orm/Xtensive.Orm/Orm/Configuration/NamingConvention.cs
index fcecfaa93..50d465141 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/NamingConvention.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/NamingConvention.cs
@@ -96,19 +96,23 @@ public override void Lock(bool recursive)
#region ICloneable members
///
+ object ICloneable.Clone() => Clone();
+
+ ///
+ /// Creates a new object that is a copy of the current instance.
+ ///
+ /// A new object that is a copy of this instance.
public NamingConvention Clone()
{
- EnsureNotLocked();
- var result = new NamingConvention();
- result.letterCasePolicy = letterCasePolicy;
- result.namespacePolicy = namespacePolicy;
- result.namingRules = namingRules;
- result.namespaceSynonyms = new Dictionary(namespaceSynonyms);
+ var result = new NamingConvention {
+ letterCasePolicy = letterCasePolicy,
+ namespacePolicy = namespacePolicy,
+ namingRules = namingRules,
+ namespaceSynonyms = new Dictionary(namespaceSynonyms)
+ };
return result;
}
- object ICloneable.Clone() => Clone();
-
#endregion
}
-}
\ No newline at end of file
+}
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/NodeConfiguration.cs b/Orm/Xtensive.Orm/Orm/Configuration/NodeConfiguration.cs
index f3288ea6e..17876db57 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/NodeConfiguration.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/NodeConfiguration.cs
@@ -92,6 +92,8 @@ public override void Lock(bool recursive = true)
DatabaseMapping.Lock();
}
+ object ICloneable.Clone() => Clone();
+
///
/// Creates clone of this instance.
///
@@ -106,8 +108,6 @@ public NodeConfiguration Clone() =>
TypeIdRegistry = TypeIdRegistry,
};
- object ICloneable.Clone() => Clone();
-
internal void Validate(DomainConfiguration configuration)
{
if (string.IsNullOrEmpty(nodeId))
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/Options/NamedOptionsCollection{T}.cs b/Orm/Xtensive.Orm/Orm/Configuration/Options/NamedOptionsCollection{T}.cs
index 342a60140..8583f8f6f 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/Options/NamedOptionsCollection{T}.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/Options/NamedOptionsCollection{T}.cs
@@ -64,10 +64,8 @@ public T this[string key]
public void Add(string name, T value)
{
ValidateName(name);
+ ArgumentNullException.ThrowIfNull(value);
- if (value == null) {
- throw new ArgumentNullException(nameof(value));
- }
value.Name = name;
if (!internalDictionary.TryAdd(name, value)) {
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/SessionConfiguration.cs b/Orm/Xtensive.Orm/Orm/Configuration/SessionConfiguration.cs
index ba8f41156..ef5ae2df1 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/SessionConfiguration.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/SessionConfiguration.cs
@@ -272,7 +272,7 @@ protected override void CopyFrom(ConfigurationBase source)
/// Clones this configuration.
///
/// The clone of this configuration.
- public new SessionConfiguration Clone()
+ public override SessionConfiguration Clone()
{
return (SessionConfiguration) base.Clone();
}
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/SessionConfigurationCollection.cs b/Orm/Xtensive.Orm/Orm/Configuration/SessionConfigurationCollection.cs
index e4e9ef869..831f60ece 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/SessionConfigurationCollection.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/SessionConfigurationCollection.cs
@@ -141,6 +141,12 @@ public override void Lock(bool recursive)
}
///
+ object ICloneable.Clone() => Clone();
+
+ ///
+ /// Creates a new object that is a copy of the current instance.
+ ///
+ /// A new object that is a copy of this instance.
public SessionConfigurationCollection Clone()
{
var result = new SessionConfigurationCollection();
@@ -149,8 +155,6 @@ public SessionConfigurationCollection Clone()
return result;
}
- object ICloneable.Clone() => Clone();
-
private SessionConfiguration GetConfiguration(string name, SessionConfiguration fallback)
{
return !IsLocked ? this[name] : fallback;
diff --git a/Orm/Xtensive.Orm/Orm/Configuration/VersioningConvention.cs b/Orm/Xtensive.Orm/Orm/Configuration/VersioningConvention.cs
index 8325e6083..e5f1a9fb2 100644
--- a/Orm/Xtensive.Orm/Orm/Configuration/VersioningConvention.cs
+++ b/Orm/Xtensive.Orm/Orm/Configuration/VersioningConvention.cs
@@ -45,16 +45,21 @@ public bool DenyEntitySetOwnerVersionChange
}
///
+ object ICloneable.Clone() => Clone();
+
+ ///
+ /// Creates a new object that is a copy of the current instance.
+ ///
+ /// A new object that is a copy of this instance.
public VersioningConvention Clone()
{
- var result = new VersioningConvention();
- result.EntityVersioningPolicy = entityVersioningPolicy;
- result.DenyEntitySetOwnerVersionChange = denyEntitySetOwnerVersionChange;
+ var result = new VersioningConvention {
+ entityVersioningPolicy = entityVersioningPolicy,
+ denyEntitySetOwnerVersionChange = denyEntitySetOwnerVersionChange
+ };
return result;
}
- object ICloneable.Clone() => Clone();
-
///
public VersioningConvention()
{
@@ -63,4 +68,3 @@ public VersioningConvention()
}
}
}
-
diff --git a/Orm/Xtensive.Orm/Orm/ConnectionEventData.cs b/Orm/Xtensive.Orm/Orm/ConnectionEventData.cs
index 568a76607..58422d500 100644
--- a/Orm/Xtensive.Orm/Orm/ConnectionEventData.cs
+++ b/Orm/Xtensive.Orm/Orm/ConnectionEventData.cs
@@ -2,6 +2,7 @@
// This code is distributed under MIT license terms.
// See the License.txt file in the project root for more information.
+using System;
using System.Data.Common;
using Xtensive.Core;
diff --git a/Orm/Xtensive.Orm/Orm/Entity.cs b/Orm/Xtensive.Orm/Orm/Entity.cs
index baed27cdb..e20cb6ff4 100644
--- a/Orm/Xtensive.Orm/Orm/Entity.cs
+++ b/Orm/Xtensive.Orm/Orm/Entity.cs
@@ -91,7 +91,7 @@ internal EntityState State {
set {
ArgumentNullException.ThrowIfNull(value);
if (state!=null)
- throw Exceptions.AlreadyInitialized("State");
+ throw Exceptions.AlreadyInitialized(nameof(State));
state = value;
state.Entity = this;
}
diff --git a/Orm/Xtensive.Orm/Orm/FullTextSearchCondition/Nodes/ComplexTerm.cs b/Orm/Xtensive.Orm/Orm/FullTextSearchCondition/Nodes/ComplexTerm.cs
index 1572de5fb..9a86bb730 100644
--- a/Orm/Xtensive.Orm/Orm/FullTextSearchCondition/Nodes/ComplexTerm.cs
+++ b/Orm/Xtensive.Orm/Orm/FullTextSearchCondition/Nodes/ComplexTerm.cs
@@ -1,9 +1,10 @@
-// Copyright (C) 2003-2016 Xtensive LLC.
+// Copyright (C) 2003-2016 Xtensive LLC.
// All rights reserved.
// For conditions of distribution and use, see license.
// Created by: Alexey Kulakov
// Created: 2016.12.09
+using System;
using Xtensive.Core;
using Xtensive.Orm.FullTextSearchCondition.Interfaces;
diff --git a/Orm/Xtensive.Orm/Orm/FullTextSearchCondition/Nodes/GenerationTerm.cs b/Orm/Xtensive.Orm/Orm/FullTextSearchCondition/Nodes/GenerationTerm.cs
index da23fcd6a..680b24264 100644
--- a/Orm/Xtensive.Orm/Orm/FullTextSearchCondition/Nodes/GenerationTerm.cs
+++ b/Orm/Xtensive.Orm/Orm/FullTextSearchCondition/Nodes/GenerationTerm.cs
@@ -1,4 +1,4 @@
-// Copyright (C) 2003-2016 Xtensive LLC.
+// Copyright (C) 2003-2016 Xtensive LLC.
// All rights reserved.
// For conditions of distribution and use, see license.
// Created by: Alexey Kulakov
@@ -35,9 +35,9 @@ internal GenerationTerm(IOperator source, GenerationType generationType, ICollec
ArgumentNullException.ThrowIfNull(source);
ArgumentNullException.ThrowIfNull(terms);
if (terms.Count==0)
- throw new ArgumentException(Strings.ExCollectionIsEmpty, "terms");
+ throw new ArgumentException(Strings.ExCollectionIsEmpty, nameof(terms));
if (terms.Any(c=>c.IsNullOrEmpty() || c.Trim().IsNullOrEmpty()))
- throw new ArgumentException(Strings.ExCollectionCannotContainAnyNeitherNullOrEmptyStringValues, "terms");
+ throw new ArgumentException(Strings.ExCollectionCannotContainAnyNeitherNullOrEmptyStringValues, nameof(terms));
GenerationType = generationType;
Terms = terms.ToArray().AsSafeWrapper();
}
diff --git a/Orm/Xtensive.Orm/Orm/Internals/KeyGenerators/Caching/DomainCachingSequenceProvider.cs b/Orm/Xtensive.Orm/Orm/Internals/KeyGenerators/Caching/DomainCachingSequenceProvider.cs
index 3dfa6be36..f9bed1ce6 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/KeyGenerators/Caching/DomainCachingSequenceProvider.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/KeyGenerators/Caching/DomainCachingSequenceProvider.cs
@@ -4,6 +4,7 @@
// Created by: Denis Krjuchkov
// Created: 2012.05.17
+using System;
using Xtensive.Core;
using Xtensive.Orm.Model;
using Xtensive.Orm.Providers;
diff --git a/Orm/Xtensive.Orm/Orm/Internals/KeyGenerators/Caching/SessionCachingSequenceProvider.cs b/Orm/Xtensive.Orm/Orm/Internals/KeyGenerators/Caching/SessionCachingSequenceProvider.cs
index 28fd7e863..ff396abf4 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/KeyGenerators/Caching/SessionCachingSequenceProvider.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/KeyGenerators/Caching/SessionCachingSequenceProvider.cs
@@ -4,6 +4,7 @@
// Created by: Denis Krjuchkov
// Created: 2012.05.17
+using System;
using System.Collections.Generic;
using Xtensive.Core;
using Xtensive.Orm.Model;
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/EntityContainer.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/EntityContainer.cs
index bd70b3212..03c6e6a70 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/EntityContainer.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/EntityContainer.cs
@@ -91,9 +91,9 @@ protected EntityContainer(Key key, TypeInfo type, bool exactType, PrefetchManage
ArgumentNullException.ThrowIfNull(type);
ArgumentNullException.ThrowIfNull(manager, "processor");
Key = key;
- Type = type;
+ Type = type ?? throw new ArgumentNullException(nameof(type));
ExactType = exactType;
- Manager = manager;
+ Manager = manager ?? throw new ArgumentNullException(nameof(manager));
}
}
}
\ No newline at end of file
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/EntitySetTask.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/EntitySetTask.cs
index 5b0b0df54..ace3377f6 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/EntitySetTask.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/EntitySetTask.cs
@@ -259,7 +259,7 @@ public EntitySetTask(Key ownerKey, in PrefetchFieldDescriptor referencingFieldDe
this.referencingFieldDescriptor = referencingFieldDescriptor;
this.isOwnerCached = isOwnerCached;
ItemCountLimit = referencingFieldDescriptor.EntitySetItemCountLimit;
- this.manager = manager;
+ this.manager = manager ?? throw new ArgumentNullException(nameof(manager));
cacheKey = new ItemsQueryCacheKey(ReferencingField, ItemCountLimit);
}
}
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Fetcher.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Fetcher.cs
index a983b3872..fe87987d7 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Fetcher.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Fetcher.cs
@@ -4,6 +4,7 @@
// Created by: Alexander Nikolaev
// Created: 2009.10.20
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/GraphContainer.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/GraphContainer.cs
index f451574cc..6e84a1278 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/GraphContainer.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/GraphContainer.cs
@@ -9,6 +9,7 @@
using Xtensive.Core;
using Xtensive.Tuples;
using Xtensive.Orm.Model;
+using System;
namespace Xtensive.Orm.Internals.Prefetch
{
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/ExpressionMapBuilder.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/ExpressionMapBuilder.cs
index f660b1235..647aafebf 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/ExpressionMapBuilder.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/ExpressionMapBuilder.cs
@@ -34,7 +34,7 @@ public override Expression Visit(Expression e)
return e;
}
- protected override Expression VisitParameter(ParameterExpression p)
+ protected override ParameterExpression VisitParameter(ParameterExpression p)
{
ValidateParameter(p);
return p;
@@ -49,7 +49,7 @@ protected override Expression VisitLambda(Expression l)
return l;
}
- protected override Expression VisitMethodCall(MethodCallExpression call)
+ protected override MethodCallExpression VisitMethodCall(MethodCallExpression call)
{
// Unpack nested "target.Prefetch(lambda)" call
// We will directly map lambda to target to simplify work for NodeBuilder.
@@ -80,7 +80,7 @@ protected override Expression VisitMethodCall(MethodCallExpression call)
return call;
}
- protected override Expression VisitMember(MemberExpression m)
+ protected override MemberExpression VisitMember(MemberExpression m)
{
ValidateMemberAccess(m);
result.RegisterChild(m.Expression, m);
@@ -106,6 +106,7 @@ private static void ValidateExpressionType(Expression e)
private void ValidateParameter(ParameterExpression p)
{
if (currentParameter!=p)
+
throw new NotSupportedException("Outer parameter should not be accessed from nested Prefetch() call");
}
@@ -135,4 +136,4 @@ private ExpressionMapBuilder()
{
}
}
-}
\ No newline at end of file
+}
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/IHasNestedNodes.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/IHasNestedNodes.cs
index 283995835..d179e3e0b 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/IHasNestedNodes.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/IHasNestedNodes.cs
@@ -13,7 +13,7 @@ internal interface IHasNestedNodes
{
IReadOnlyList NestedNodes { get; }
- IReadOnlyCollection ExtractKeys(object target);
+ IReadOnlyList ExtractKeys(object target);
IHasNestedNodes ReplaceNestedNodes(IReadOnlyList nestedNodes);
}
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/KeyExtractorNode.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/KeyExtractorNode.cs
index ceb67b91a..6a30b38ed 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/KeyExtractorNode.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/KeyExtractorNode.cs
@@ -13,22 +13,24 @@ namespace Xtensive.Orm.Internals.Prefetch
{
internal sealed class KeyExtractorNode : Node, IHasNestedNodes
{
- public Func> KeyExtractor { get; }
+ public Func> KeyExtractor { get; }
public IReadOnlyList NestedNodes { get; }
- IReadOnlyCollection IHasNestedNodes.ExtractKeys(object target)
+ IReadOnlyList IHasNestedNodes.ExtractKeys(object target)
{
return ExtractKeys((T) target);
}
- public IReadOnlyCollection ExtractKeys(T target)
+ public IReadOnlyList ExtractKeys(T target)
{
return KeyExtractor.Invoke(target);
}
- public IHasNestedNodes ReplaceNestedNodes(IReadOnlyList nestedNodes) =>
- new KeyExtractorNode(KeyExtractor, nestedNodes);
+ public IHasNestedNodes ReplaceNestedNodes(IReadOnlyList nestedNodes)
+ {
+ return new KeyExtractorNode(KeyExtractor, nestedNodes);
+ }
public override Node Accept(NodeVisitor visitor)
{
@@ -40,7 +42,7 @@ protected override string GetDescription()
return $"KeyExtraction<{typeof(T).Name}>";
}
- public KeyExtractorNode(Func> extractor, IReadOnlyList nestedNodes)
+ public KeyExtractorNode(Func> extractor, IReadOnlyList nestedNodes)
: base("*")
{
ArgumentNullException.ThrowIfNull(extractor);
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/NodeAggregator.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/NodeAggregator.cs
index 3f859f932..0a6e40521 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/NodeAggregator.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/NodeAggregator.cs
@@ -19,7 +19,7 @@ public static IList> Aggregate(IEnumerable ken.Path, (path, @group) =>
(Node) @group.First().ReplaceNestedNodes(
- @group.SelectMany(ken => ken.NestedNodes).ToList().AsSafeWrapper()))
+ @group.SelectMany(ken => ken.NestedNodes).ToList()))
.Select(aggregator.Visit)
.Cast>()
.ToList();
@@ -36,11 +36,11 @@ public override IReadOnlyList VisitNodeList(IReadOnlyList().SelectMany(c => c.NestedNodes).ToList().AsSafeWrapper());
+ group.Cast().SelectMany(c => c.NestedNodes).ToList());
result.Add((BaseFieldNode) Visit(nodeToVisit));
}
}
- return result.AsSafeWrapper();
+ return result;
}
// Constructor
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/NodeBuilder.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/NodeBuilder.cs
index c71c5114e..b000aac21 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/NodeBuilder.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/NodeBuilder.cs
@@ -34,7 +34,7 @@ public static KeyExtractorNode Build(DomainModel model, Expression
return new KeyExtractorNode(GetExtractor(), nestedNodes);
}
- private static Func> GetExtractor()
+ private static Func> GetExtractor()
{
return target => new[] {((IEntity) target).Key};
}
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/NodeVisitor.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/NodeVisitor.cs
index ec98bc9a9..bf69038fd 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/NodeVisitor.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/NodeVisitor.cs
@@ -5,8 +5,6 @@
// Created: 2011.01.14
using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using Xtensive.Core;
namespace Xtensive.Orm.Internals.Prefetch
{
@@ -37,7 +35,9 @@ public virtual IReadOnlyList VisitNodeList(IReadOnlyList(KeyExtractorNode keyExtractorNode)
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/ReferenceNode.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/ReferenceNode.cs
index 2c21be991..64344a98c 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/ReferenceNode.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/ReferenceNode.cs
@@ -17,7 +17,7 @@ internal sealed class ReferenceNode : BaseFieldNode, IHasNestedNodes
public IReadOnlyList NestedNodes { get; private set; }
- public IReadOnlyCollection ExtractKeys(object target)
+ public IReadOnlyList ExtractKeys(object target)
{
if (target == null) {
return Array.Empty();
@@ -30,8 +30,10 @@ public IReadOnlyCollection ExtractKeys(object target)
: new[] {referenceKey};
}
- public IHasNestedNodes ReplaceNestedNodes(IReadOnlyList nestedNodes) =>
- new ReferenceNode(Path, Field, ReferenceType, NestedNodes);
+ public IHasNestedNodes ReplaceNestedNodes(IReadOnlyList nestedNodes)
+ {
+ return new ReferenceNode(Path, Field, ReferenceType, NestedNodes);
+ }
public override Node Accept(NodeVisitor visitor)
{
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/SetNode.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/SetNode.cs
index 3e7e5f52e..e7bc0fdfc 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/SetNode.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/Nodes/SetNode.cs
@@ -18,7 +18,7 @@ internal sealed class SetNode : BaseFieldNode, IHasNestedNodes
public TypeInfo ElementType { get; }
- public IReadOnlyCollection ExtractKeys(object target)
+ public IReadOnlyList ExtractKeys(object target)
{
if (target == null) {
return Array.Empty();
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/PrefetchFieldDescriptor.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/PrefetchFieldDescriptor.cs
index 377cd1d01..ae0b3dcdb 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/PrefetchFieldDescriptor.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/PrefetchFieldDescriptor.cs
@@ -155,7 +155,7 @@ private PrefetchFieldDescriptor(
if (entitySetItemCountLimit != null) {
ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(entitySetItemCountLimit.Value, 0);
}
- Field = field;
+ Field = field ?? throw new ArgumentNullException(nameof(field));
FetchFieldsOfReferencedEntity = fetchFieldsOfReferencedEntity;
EntitySetItemCountLimit = entitySetItemCountLimit;
FetchLazyFields = fetchLazyFields;
diff --git a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/PrefetchHelper.cs b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/PrefetchHelper.cs
index a18c9b15a..68e86175f 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/Prefetch/PrefetchHelper.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/Prefetch/PrefetchHelper.cs
@@ -18,8 +18,7 @@ internal static class PrefetchHelper
type.Fields
.Where(field => field.Parent == null && IsFieldToBeLoadedByDefault(field))
.Select(field => new PrefetchFieldDescriptor(field, false, false))
- .ToList()
- .AsSafeWrapper();
+ .ToArray();
public static bool IsFieldToBeLoadedByDefault(FieldInfo field)
{
diff --git a/Orm/Xtensive.Orm/Orm/Internals/ReferentialIntegrity/RemovalProcessor.cs b/Orm/Xtensive.Orm/Orm/Internals/ReferentialIntegrity/RemovalProcessor.cs
index 12a3c7553..685024968 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/ReferentialIntegrity/RemovalProcessor.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/ReferentialIntegrity/RemovalProcessor.cs
@@ -58,7 +58,7 @@ public void Remove(IEnumerable entities, EntityRemoveReason reason)
if (isEmpty) {
return;
}
- var processedEntities = new List();
+ IReadOnlyList processedEntities = Array.Empty();
var notifiedEntities = new HashSet();
try {
var operations = Session.Operations;
diff --git a/Orm/Xtensive.Orm/Orm/Internals/RemapContext.cs b/Orm/Xtensive.Orm/Orm/Internals/RemapContext.cs
index 13324463a..bdf7786ae 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/RemapContext.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/RemapContext.cs
@@ -4,6 +4,7 @@
// Created by: Alexey Kulakov
// Created: 2014.04.07
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Xtensive.Core;
diff --git a/Orm/Xtensive.Orm/Orm/Internals/StorageNodeRegistry.cs b/Orm/Xtensive.Orm/Orm/Internals/StorageNodeRegistry.cs
index e4c47f09f..8f628f5c3 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/StorageNodeRegistry.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/StorageNodeRegistry.cs
@@ -1,4 +1,4 @@
-// Copyright (C) 2014 Xtensive LLC.
+// Copyright (C) 2014 Xtensive LLC.
// All rights reserved.
// For conditions of distribution and use, see license.
// Created by: Denis Krjuchkov
diff --git a/Orm/Xtensive.Orm/Orm/Internals/VersionGenerator.cs b/Orm/Xtensive.Orm/Orm/Internals/VersionGenerator.cs
index 7ffe41cca..efc18f10b 100644
--- a/Orm/Xtensive.Orm/Orm/Internals/VersionGenerator.cs
+++ b/Orm/Xtensive.Orm/Orm/Internals/VersionGenerator.cs
@@ -24,7 +24,7 @@ public static class VersionGenerator
/// Unsupported type.
public static object GenerateNextVersion(object currentVersion)
{
- ArgumentNullException.ThrowIfNull(currentVersion, "currentValue");
+ ArgumentNullException.ThrowIfNull(currentVersion);
TypeCode code = Type.GetTypeCode(currentVersion.GetType());
switch (code) {
diff --git a/Orm/Xtensive.Orm/Orm/Linq/Expressions/ConstructorExpression.cs b/Orm/Xtensive.Orm/Orm/Linq/Expressions/ConstructorExpression.cs
index 50f986efe..71443d828 100644
--- a/Orm/Xtensive.Orm/Orm/Linq/Expressions/ConstructorExpression.cs
+++ b/Orm/Xtensive.Orm/Orm/Linq/Expressions/ConstructorExpression.cs
@@ -1,19 +1,17 @@
-// Copyright (C) 2003-2010 Xtensive LLC.
-// All rights reserved.
-// For conditions of distribution and use, see license.
+// Copyright (C) 2009-2026 Xtensive LLC.
+// This code is distributed under MIT license terms.
+// See the License.txt file in the project root for more information.
// Created by: Alexey Gamzov
// Created: 2009.10.16
using System;
using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
-using Xtensive.Collections;
using Xtensive.Core;
using Xtensive.Orm.Linq.Expressions;
using Xtensive.Orm.Linq.Expressions.Visitors;
+using System.Linq;
namespace Xtensive.Orm.Linq
{
@@ -30,26 +28,32 @@ internal sealed class ConstructorExpression : ParameterizedExpression
public override ParameterizedExpression BindParameter(ParameterExpression parameter, Dictionary processedExpressions)
{
- GenericExpressionVisitor genericVisitor = new(mapped => mapped.BindParameter(parameter, processedExpressions));
- var genericBinder = genericVisitor.Process;
+ Func genericBinder =
+ e => GenericExpressionVisitor.Process(e, mapped => mapped.BindParameter(parameter, processedExpressions));
+
return new ConstructorExpression(
Type,
- Bindings.ToDictionary(kvp => kvp.Key, kvp => genericBinder(kvp.Value)),
- NativeBindings.ToDictionary(kvp=>kvp.Key, kvp => genericBinder(kvp.Value)),
+ Bindings.ToDictionary(kvp => kvp.Key, kvp => genericBinder(kvp.Value), Bindings.Count),
+ NativeBindings.ToDictionary(kvp=>kvp.Key, kvp => genericBinder(kvp.Value), NativeBindings.Count),
Constructor,
- ConstructorArguments.Select(genericBinder).ToArray());
+ ReferenceEquals(ConstructorArguments, Array.Empty())
+ ? ConstructorArguments
+ : ConstructorArguments.Select(genericBinder).ToArray());
}
public override Expression RemoveOuterParameter(Dictionary processedExpressions)
{
- GenericExpressionVisitor genericVisitor = new(mapped => mapped.RemoveOuterParameter(processedExpressions));
- var genericRemover = genericVisitor.Process;
+ Func genericRemover =
+ e => GenericExpressionVisitor.Process(e, mapped => mapped.RemoveOuterParameter(processedExpressions));
+
var result = new ConstructorExpression(
Type,
Bindings.ToDictionary(kvp => kvp.Key, kvp => genericRemover(kvp.Value)),
NativeBindings = NativeBindings.ToDictionary(kvp => kvp.Key, kvp => genericRemover(kvp.Value)),
Constructor,
- ConstructorArguments.Select(genericRemover).ToArray());
+ ReferenceEquals(ConstructorArguments, Array.Empty())
+ ? ConstructorArguments
+ : ConstructorArguments.Select(genericRemover).ToArray());
return result;
}
@@ -61,10 +65,12 @@ public override Expression Remap(ColNum offset, Dictionary());
return (Expression) mapped;
};
- GenericExpressionVisitor genericVisitor = new(remapper);
- var newBindings = Bindings.ToDictionary(kvp => kvp.Key, kvp => genericVisitor.Process(kvp.Value));
- var newConstructorArguments = ConstructorArguments.Select(genericVisitor.Process).ToArray();
- var newNativeBindings = NativeBindings.ToDictionary(kvp => kvp.Key, kvp => genericVisitor.Process(kvp.Value));
+
+ var newBindings = Bindings.ToDictionary(kvp => kvp.Key, kvp => GenericExpressionVisitor.Process(kvp.Value, remapper));
+ var newConstructorArguments = ConstructorArguments.Count == 0
+ ? ConstructorArguments
+ : ConstructorArguments.Select(arg => GenericExpressionVisitor.Process(arg, remapper)).ToArray();
+ var newNativeBindings = NativeBindings.ToDictionary(kvp => kvp.Key, kvp => GenericExpressionVisitor.Process(kvp.Value, remapper));
var result = new ConstructorExpression(
Type,
newBindings,
@@ -82,20 +88,28 @@ public override Expression Remap(ColumnMap map, Dictionary());
return (Expression) mapped;
};
- GenericExpressionVisitor genericVisitor = new(remapper);
- var newBindings = Bindings.ToDictionary(kvp => kvp.Key, kvp => genericVisitor.Process(kvp.Value));
- var newConstructorArguments = ConstructorArguments.Select(genericVisitor.Process).ToArray();
- var newNativeBindings = NativeBindings.ToDictionary(kvp => kvp.Key, kvp => genericVisitor.Process(kvp.Value));
+
+ var newBindings = Bindings.ToDictionary(kvp => kvp.Key, kvp => GenericExpressionVisitor.Process(kvp.Value, remapper));
+ var newConstructorArguments = ConstructorArguments.Count == 0
+ ? ConstructorArguments
+ : ConstructorArguments.Select(arg => GenericExpressionVisitor.Process(arg, remapper)).ToArray();
+ var newNativeBindings = NativeBindings.ToDictionary(kvp => kvp.Key, kvp => GenericExpressionVisitor.Process(kvp.Value, remapper));
return new ConstructorExpression(Type, newBindings, newNativeBindings, Constructor, newConstructorArguments);
}
internal override Expression Accept(ExtendedExpressionVisitor visitor) => visitor.VisitConstructorExpression(this);
- public ConstructorExpression(Type type, Dictionary bindings, Dictionary nativeBindings, ConstructorInfo constructor, IReadOnlyList constructorArguments)
+ public ConstructorExpression(Type type,
+ Dictionary bindings,
+ Dictionary nativeBindings,
+ ConstructorInfo constructor,
+ IReadOnlyList constructorArguments)
: base(ExtendedExpressionType.Constructor, type, null, false)
{
Bindings = bindings ?? new Dictionary();
NativeBindings = nativeBindings;
+ // consistently use keep empty array instead of any other empty collection,
+ // there are checks that help to not instanciate collections
ConstructorArguments = constructorArguments ?? Array.Empty();
Constructor = constructor;
}
diff --git a/Orm/Xtensive.Orm/Orm/Linq/Expressions/EntityExpression.cs b/Orm/Xtensive.Orm/Orm/Linq/Expressions/EntityExpression.cs
index c59ccac85..2fc2525ee 100644
--- a/Orm/Xtensive.Orm/Orm/Linq/Expressions/EntityExpression.cs
+++ b/Orm/Xtensive.Orm/Orm/Linq/Expressions/EntityExpression.cs
@@ -122,7 +122,7 @@ public static void Fill(EntityExpression entityExpression, ColNum offset)
_ = entityExpression.Remap(offset, new Dictionary());
}
var typeInfo = entityExpression.PersistentType;
- foreach (var nestedField in typeInfo.Fields.Except(entityExpression.Fields.OfType().Select(field => field.Field))) {
+ foreach (var nestedField in typeInfo.Fields.Except(entityExpression.Fields.OfAnyFieldExpression().Select(field => field.Field))) {
var nestedFieldExpression = BuildNestedFieldExpression(nestedField, offset);
if (nestedFieldExpression is FieldExpression fieldExpression) {
fieldExpression.Owner = entityExpression;
diff --git a/Orm/Xtensive.Orm/Orm/Linq/Expressions/KeyExpression.cs b/Orm/Xtensive.Orm/Orm/Linq/Expressions/KeyExpression.cs
index d6219a224..f7cd939a3 100644
--- a/Orm/Xtensive.Orm/Orm/Linq/Expressions/KeyExpression.cs
+++ b/Orm/Xtensive.Orm/Orm/Linq/Expressions/KeyExpression.cs
@@ -77,10 +77,25 @@ public override KeyExpression BindParameter(
for (int i = 0; i < n; ++i) {
fields[i] = KeyFields[i].BindParameter(parameter, processedExpressions);
}
+ return BindParameterWithNoCheck(parameter, processedExpressions);
+ }
+
+ // Having this code as a separate method helps to avoid closure allocation during BindParameter call
+ // in case processedExpressions dictionary already contains a result.
+ private KeyExpression BindParameterWithNoCheck(
+ ParameterExpression parameter, Dictionary processedExpressions)
+ {
+ var fields = KeyFields.Select(BindParameter).ToArray(KeyFields.Count);
var result = new KeyExpression(EntityType, fields, Mapping, UnderlyingProperty, parameter, DefaultIfEmpty);
processedExpressions.Add(this, result);
return result;
+
+
+ FieldExpression BindParameter(FieldExpression f)
+ {
+ return (FieldExpression) f.BindParameter(parameter, processedExpressions);
+ }
}
public override KeyExpression RemoveOuterParameter(Dictionary processedExpressions)
@@ -94,18 +109,30 @@ public override KeyExpression RemoveOuterParameter(Dictionary processedExpressions)
+ {
+ var fields = KeyFields.Select(RemoveOuterParameter).ToArray(KeyFields.Count);
var result = new KeyExpression(EntityType, fields, Mapping, UnderlyingProperty, null, DefaultIfEmpty);
processedExpressions.Add(this, result);
return result;
+
+
+ FieldExpression RemoveOuterParameter(FieldExpression f)
+ {
+ return (FieldExpression) f.RemoveOuterParameter(processedExpressions);
+ }
}
public static KeyExpression Create(TypeInfo entityType, ColNum offset)
{
var mapping = new Segment