Skip to content

Commit 63916a3

Browse files
damir-usmanovvgrebenschikov
authored andcommitted
Refactor namespaces and enhance code structure (#8)
* Refactor namespaces and enhance code structure Key changes include: - Enhanced organization of the `RqlExpression` class with method regions for better readability. - Updated `RqlOperators` and `RqlSelectModes` enums to include the `[Flags]` attribute for improved usability. - Refactored `RqlPropertyAttribute` for streamlined handling of actions, operators, and selection modes. - Introduced interfaces like `IRqlNode` and `IRqlQueryable` to promote better object-oriented design. - Restructured `RqlSettings` and related classes for cohesive configuration management. - Updated test files to ensure relevance and functionality with the new structure. These changes aim to improve modularity, readability, and maintainability while adhering to modern C# practices. * namespace adjustments * IRqlMapAccessor moved to abstractions * Refactor RQL configuration and result handling
1 parent a000954 commit 63916a3

File tree

81 files changed

+757
-700
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+757
-700
lines changed

.github/workflows/sonar.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ jobs:
2626
with:
2727
java-version: 17
2828
distribution: 'zulu'
29-
29+
3030
- name: Cache SonarCloud packages
3131
uses: actions/cache@v4
3232
with:
33-
path: ~\sonar\cache
33+
path: ~/sonar/cache
3434
key: ${{ runner.os }}-sonar
3535
restore-keys: ${{ runner.os }}-sonar
3636

3737
- name: Cache SonarCloud scanner
3838
id: cache-sonar-scanner
3939
uses: actions/cache@v4
4040
with:
41-
path: .\.sonar\scanner
41+
path: ./.sonar/scanner
4242
key: ${{ runner.os }}-sonar-scanner
4343
restore-keys: ${{ runner.os }}-sonar-scanner
4444

@@ -73,4 +73,4 @@ jobs:
7373
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
7474
shell: bash
7575
run: |
76-
.sonar/scanner/dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
76+
.sonar/scanner/dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"

samples/Rql.Sample.Api/Extensions/Core/ErrorResultProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Microsoft.AspNetCore.Mvc;
22
using Microsoft.AspNetCore.Mvc.Infrastructure;
33
using Microsoft.AspNetCore.Mvc.ModelBinding;
4-
using SoftwareOne.Rql.Linq.Core.Result;
4+
using SoftwareOne.Rql.Abstractions.Result;
55

66
namespace Rql.Sample.Api.Extensions.Core;
77

samples/Rql.Sample.Api/Extensions/Core/IErrorResultProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Microsoft.AspNetCore.Mvc;
2-
using SoftwareOne.Rql.Linq.Core.Result;
2+
using SoftwareOne.Rql.Abstractions.Result;
33

44
namespace Rql.Sample.Api.Extensions.Core;
55

samples/Rql.Sample.Api/Extensions/Core/RqlRequest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Microsoft.AspNetCore.Mvc;
22
using Microsoft.EntityFrameworkCore;
33
using SoftwareOne.Rql;
4+
using SoftwareOne.Rql.Abstractions;
45
using System.Globalization;
56
using System.Linq.Expressions;
67

src/SoftwareOne.Rql.Linq/Configuration/Filter/RqlFilterSettings.cs renamed to src/SoftwareOne.Rql.Abstractions/Configuration/Filter/RqlFilterSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace SoftwareOne.Rql.Linq.Configuration.Filter
1+
namespace SoftwareOne.Rql.Abstractions.Configuration.Filter
22
{
33
public class RqlFilterSettings
44
{

src/SoftwareOne.Rql.Linq/Configuration/Filter/RqlStringFilterSettings.cs renamed to src/SoftwareOne.Rql.Abstractions/Configuration/Filter/RqlStringFilterSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace SoftwareOne.Rql.Linq.Configuration
1+
namespace SoftwareOne.Rql.Abstractions.Configuration.Filter
22
{
33
public class RqlStringFilterSettings
44
{
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace SoftwareOne.Rql.Abstractions.Configuration;
2+
3+
public interface IRqlGlobalSettings
4+
{
5+
RqlGeneralSettings General { get; }
6+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using SoftwareOne.Rql.Abstractions.Configuration.Filter;
2+
3+
namespace SoftwareOne.Rql.Abstractions.Configuration;
4+
5+
public interface IRqlSettings
6+
{
7+
RqlMappingSettings Mapping { get; init; }
8+
9+
RqlSelectSettings Select { get; init; }
10+
11+
RqlFilterSettings Filter { get; init; }
12+
}

src/SoftwareOne.Rql.Linq/Configuration/RqlGeneralSettings.cs renamed to src/SoftwareOne.Rql.Abstractions/Configuration/RqlGeneralSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace SoftwareOne.Rql.Linq.Configuration;
1+
namespace SoftwareOne.Rql.Abstractions.Configuration;
22

33
public class RqlGeneralSettings
44
{

src/SoftwareOne.Rql.Linq/Configuration/RqlMappingSettings.cs renamed to src/SoftwareOne.Rql.Abstractions/Configuration/RqlMappingSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace SoftwareOne.Rql.Linq.Configuration;
1+
namespace SoftwareOne.Rql.Abstractions.Configuration;
22

33
public class RqlMappingSettings
44
{

0 commit comments

Comments
 (0)