mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-01-31 09:09:00 +03:00
Bump .NET version to 8.0 (#207)
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
18cdc63883
commit
4c50bdaff7
5 changed files with 5 additions and 5 deletions
2
.github/workflows/build-pr.yml
vendored
2
.github/workflows/build-pr.yml
vendored
|
@ -26,6 +26,6 @@ jobs:
|
||||||
uses: muno92/resharper_inspectcode@1.11.0
|
uses: muno92/resharper_inspectcode@1.11.0
|
||||||
with:
|
with:
|
||||||
solutionPath: ./Octobot.sln
|
solutionPath: ./Octobot.sln
|
||||||
ignoreIssueType: InvertIf, ConvertIfStatementToSwitchStatement
|
ignoreIssueType: InvertIf, ConvertIfStatementToSwitchStatement, ConvertToPrimaryConstructor
|
||||||
extensions: ReSharperPlugin.CognitiveComplexity
|
extensions: ReSharperPlugin.CognitiveComplexity
|
||||||
solutionWideAnalysis: true
|
solutionWideAnalysis: true
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Version>2.0.0</Version>
|
<Version>2.0.0</Version>
|
||||||
|
|
|
@ -8,7 +8,7 @@ public static class CollectionExtensions
|
||||||
this IEnumerable<TSource> source, Func<TSource, TResult> selector)
|
this IEnumerable<TSource> source, Func<TSource, TResult> selector)
|
||||||
{
|
{
|
||||||
var list = source.ToList();
|
var list = source.ToList();
|
||||||
return list.Any() ? list.Max(selector) : default;
|
return list.Count > 0 ? list.Max(selector) : default;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AddIfFailed(this List<Result> list, Result result)
|
public static void AddIfFailed(this List<Result> list, Result result)
|
||||||
|
|
|
@ -45,7 +45,7 @@ public static class StringExtensions
|
||||||
{
|
{
|
||||||
s = s.SanitizeForBlockCode();
|
s = s.SanitizeForBlockCode();
|
||||||
return
|
return
|
||||||
$"```{language}\n{s.SanitizeForBlockCode()}{(s.EndsWith("`", StringComparison.Ordinal) || string.IsNullOrWhiteSpace(s) ? " " : "")}```";
|
$"```{language}\n{s.SanitizeForBlockCode()}{(s.EndsWith('`') || string.IsNullOrWhiteSpace(s) ? " " : "")}```";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string Localized(this string key)
|
public static string Localized(this string key)
|
||||||
|
|
|
@ -126,7 +126,7 @@ public sealed class ScheduledEventUpdateService : BackgroundService
|
||||||
{
|
{
|
||||||
var filtered = from.Where(schEvent => schEvent.ID == id);
|
var filtered = from.Where(schEvent => schEvent.ID == id);
|
||||||
var filteredArray = filtered.ToArray();
|
var filteredArray = filtered.ToArray();
|
||||||
return filteredArray.Any()
|
return filteredArray.Length > 0
|
||||||
? Result<IGuildScheduledEvent>.FromSuccess(filteredArray.Single())
|
? Result<IGuildScheduledEvent>.FromSuccess(filteredArray.Single())
|
||||||
: new NotFoundError();
|
: new NotFoundError();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue