Skip to content

Commit

Permalink
fix: build errors for 8.0.200 (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
oskogstad authored Feb 14, 2024
1 parent 856c3fd commit b133f8f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 24 deletions.
5 changes: 2 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ root = true
# Enforce line endings to be LF
end_of_line = lf
# Enforce indentation to be 4 spaces
indent_style = spaces
indent_style = space
indent_size = 4
# Insert a final new line at the end of the file
insert_final_newline = true
Expand All @@ -31,7 +31,7 @@ dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
# Enforce file scoped namespaces
csharp_style_namespace_declarations = file_scoped:suggestion
# Place 'using' directives outside of namespaces
csharp_using_directive_placement = outside_namespace:true
csharp_using_directive_placement = outside_namespace

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

# Enforce indentation to be 2 spaces
indent_style = spaces
indent_size = 2
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static bool TryGetOrgNumber(this Claim? consumerClaim, [NotNullWhen(true)

orgNumber = id.Split(IdDelimiter) switch
{
[IdPrefix, var on] => NorwegianOrganizationIdentifier.IsValid(on) ? on : null,
[IdPrefix, var on] => NorwegianOrganizationIdentifier.IsValid(on) ? on : null,
_ => null
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ public static bool TryParse(string? value, out ContinuationTokenSet<TOrderDefini
.Split(PaginationConstants.ContinuationTokenSetDelimiter, StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)
.Select(x => x.Split(PaginationConstants.ContinuationTokenDelimiter, StringSplitOptions.TrimEntries) switch
{
[var key, var ctAsString]
when OrderOptions<TOrderDefinition, TTarget>.Value.TryGetSelector(key, out var option)
&& TryParseExtensions.TryParse(option.Body.Type, ctAsString, out var ct)
=> new ContinuationToken(key, ct, option.Body.Type),
[var key, var ctAsString]
when OrderOptions<TOrderDefinition, TTarget>.Value.TryGetSelector(key, out var option)
&& TryParseExtensions.TryParse(option.Body.Type, ctAsString, out var ct) => new ContinuationToken(key, ct, option.Body.Type),
_ => null
});

Expand Down Expand Up @@ -73,9 +72,6 @@ public bool Equals(ContinuationToken? x, ContinuationToken? y)
return x.Key == y.Key;
}

public int GetHashCode([DisallowNull] ContinuationToken obj)
{
return obj.Key.GetHashCode();
}
public int GetHashCode([DisallowNull] ContinuationToken obj) => obj.Key.GetHashCode();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,15 @@ public bool TryParseOrder(string? value, [NotNullWhen(true)] out Order<TTarget>?

result = value.Split(PaginationConstants.OrderDelimiter, StringSplitOptions.TrimEntries) switch
{
// eks: createdAt
[var key]
when _optionByKey.TryGetValue(key, out var expression)
=> new(key, expression),

// eks: createdAt_desc
[var key, var direction]
when _optionByKey.TryGetValue(key, out var expression)
&& Enum.TryParse<OrderDirection>(direction, ignoreCase: true, out var dirEnum)
=> new(key, expression, dirEnum),
// eks: createdAt
[var key]
when _optionByKey.TryGetValue(key, out var expression)
=> new(key, expression),
// eks: createdAt_desc
[var key, var direction]
when _optionByKey.TryGetValue(key, out var expression)
&& Enum.TryParse<OrderDirection>(direction, ignoreCase: true, out var dirEnum)
=> new(key, expression, dirEnum),

_ => null
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public async Task<SaveChangesResult> SaveChangesAsync(CancellationToken cancella
if (!_enableConcurrencyCheck)
{
// Attempt to save changes without concurrency check
await ConcurrencyRetryPolicy.ExecuteAsync(ct => _dialogDbContext.SaveChangesAsync(ct), cancellationToken);
await ConcurrencyRetryPolicy.ExecuteAsync(_dialogDbContext.SaveChangesAsync, cancellationToken);

return new Success();
}
Expand Down

0 comments on commit b133f8f

Please sign in to comment.