Skip to content

Commit b133f8f

Browse files
authored
fix: build errors for 8.0.200 (#440)
1 parent 856c3fd commit b133f8f

File tree

5 files changed

+18
-24
lines changed

5 files changed

+18
-24
lines changed

.editorconfig

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ root = true
88
# Enforce line endings to be LF
99
end_of_line = lf
1010
# Enforce indentation to be 4 spaces
11-
indent_style = spaces
11+
indent_style = space
1212
indent_size = 4
1313
# Insert a final new line at the end of the file
1414
insert_final_newline = true
@@ -31,7 +31,7 @@ dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
3131
# Enforce file scoped namespaces
3232
csharp_style_namespace_declarations = file_scoped:suggestion
3333
# Place 'using' directives outside of namespaces
34-
csharp_using_directive_placement = outside_namespace:true
34+
csharp_using_directive_placement = outside_namespace
3535

3636
# Disabling this because of https://github.com/dotnet/roslyn/issues/41640
3737
dotnet_diagnostic.IDE0005.severity = none
@@ -69,5 +69,4 @@ dotnet_diagnostic.CA2208.severity = suggestion
6969
[*.yml]
7070

7171
# Enforce indentation to be 2 spaces
72-
indent_style = spaces
7372
indent_size = 2

src/Digdir.Domain.Dialogporten.Application/Common/Extensions/ClaimsPrincipalExtensions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static bool TryGetOrgNumber(this Claim? consumerClaim, [NotNullWhen(true)
6767

6868
orgNumber = id.Split(IdDelimiter) switch
6969
{
70-
[IdPrefix, var on] => NorwegianOrganizationIdentifier.IsValid(on) ? on : null,
70+
[IdPrefix, var on] => NorwegianOrganizationIdentifier.IsValid(on) ? on : null,
7171
_ => null
7272
};
7373

src/Digdir.Domain.Dialogporten.Application/Common/Pagination/Continuation/ContinuationTokenSet.cs

+5-9
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ public static bool TryParse(string? value, out ContinuationTokenSet<TOrderDefini
3737
.Split(PaginationConstants.ContinuationTokenSetDelimiter, StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)
3838
.Select(x => x.Split(PaginationConstants.ContinuationTokenDelimiter, StringSplitOptions.TrimEntries) switch
3939
{
40-
[var key, var ctAsString]
41-
when OrderOptions<TOrderDefinition, TTarget>.Value.TryGetSelector(key, out var option)
42-
&& TryParseExtensions.TryParse(option.Body.Type, ctAsString, out var ct)
43-
=> new ContinuationToken(key, ct, option.Body.Type),
40+
[var key, var ctAsString]
41+
when OrderOptions<TOrderDefinition, TTarget>.Value.TryGetSelector(key, out var option)
42+
&& TryParseExtensions.TryParse(option.Body.Type, ctAsString, out var ct) => new ContinuationToken(key, ct, option.Body.Type),
4443
_ => null
4544
});
4645

@@ -73,9 +72,6 @@ public bool Equals(ContinuationToken? x, ContinuationToken? y)
7372
return x.Key == y.Key;
7473
}
7574

76-
public int GetHashCode([DisallowNull] ContinuationToken obj)
77-
{
78-
return obj.Key.GetHashCode();
79-
}
75+
public int GetHashCode([DisallowNull] ContinuationToken obj) => obj.Key.GetHashCode();
8076
}
81-
}
77+
}

src/Digdir.Domain.Dialogporten.Application/Common/Pagination/OrderOption/IOrderOptions.cs

+9-10
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,15 @@ public bool TryParseOrder(string? value, [NotNullWhen(true)] out Order<TTarget>?
4343

4444
result = value.Split(PaginationConstants.OrderDelimiter, StringSplitOptions.TrimEntries) switch
4545
{
46-
// eks: createdAt
47-
[var key]
48-
when _optionByKey.TryGetValue(key, out var expression)
49-
=> new(key, expression),
50-
51-
// eks: createdAt_desc
52-
[var key, var direction]
53-
when _optionByKey.TryGetValue(key, out var expression)
54-
&& Enum.TryParse<OrderDirection>(direction, ignoreCase: true, out var dirEnum)
55-
=> new(key, expression, dirEnum),
46+
// eks: createdAt
47+
[var key]
48+
when _optionByKey.TryGetValue(key, out var expression)
49+
=> new(key, expression),
50+
// eks: createdAt_desc
51+
[var key, var direction]
52+
when _optionByKey.TryGetValue(key, out var expression)
53+
&& Enum.TryParse<OrderDirection>(direction, ignoreCase: true, out var dirEnum)
54+
=> new(key, expression, dirEnum),
5655

5756
_ => null
5857
};

src/Digdir.Domain.Dialogporten.Infrastructure/UnitOfWork.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public async Task<SaveChangesResult> SaveChangesAsync(CancellationToken cancella
9696
if (!_enableConcurrencyCheck)
9797
{
9898
// Attempt to save changes without concurrency check
99-
await ConcurrencyRetryPolicy.ExecuteAsync(ct => _dialogDbContext.SaveChangesAsync(ct), cancellationToken);
99+
await ConcurrencyRetryPolicy.ExecuteAsync(_dialogDbContext.SaveChangesAsync, cancellationToken);
100100

101101
return new Success();
102102
}

0 commit comments

Comments
 (0)