refactor: Upgrade to SuperLinq v6.0.0

Some code changes required.
pull/241/head
Robert Dailey 7 months ago
parent a1be77f800
commit 8f3c0a7b6b

@ -24,7 +24,7 @@
<PackageVersion Include="Spectre.Console" Version="0.48.0" />
<PackageVersion Include="Spectre.Console.Analyzer" Version="0.48.0" />
<PackageVersion Include="Spectre.Console.Cli" Version="0.48.0" />
<PackageVersion Include="SuperLinq" Version="5.4.0" />
<PackageVersion Include="SuperLinq" Version="6.0.0" />
<PackageVersion Include="System.Data.HashFunction.FNV" Version="2.0.0" />
<PackageVersion Include="System.Private.Uri" Version="4.3.2" />
<PackageVersion Include="System.Reactive" Version="6.0.0" />

@ -21,7 +21,7 @@ public class CustomFormatCache(IEnumerable<TrashIdMapping> mappings)
_mappings = _mappings
.DistinctBy(x => x.CustomFormatId)
.Where(x => transactions.DeletedCustomFormats.All(y => y.CustomFormatId != x.CustomFormatId))
.FullOuterJoin(existingCfs, JoinType.Hash,
.FullOuterHashJoin(existingCfs,
l => l.CustomFormatId,
r => r.Id,
// Keep existing service CFs, even if they aren't in user config

@ -121,7 +121,7 @@ public class QualityProfileTransactionPhase(QualityProfileStatCalculator statCal
QualityProfileDto profileDto)
{
var scoreMap = profileData.CfScores
.FullOuterJoin(profileDto.FormatItems, JoinType.Hash,
.FullOuterHashJoin(profileDto.FormatItems,
x => x.FormatId,
x => x.Format,
// Exists in config, but not in service (these are unusual and should be errors)

@ -15,6 +15,7 @@
<PackageReference Include="Serilog.Sinks.File" />
<PackageReference Include="Spectre.Console.Analyzer" PrivateAssets="All" />
<PackageReference Include="Spectre.Console.Cli" />
<PackageReference Include="SuperLinq" />
<PackageReference Include="System.Data.HashFunction.FNV" />
<PackageReference Include="SystemTextJson.JsonDiffPatch" />
<PackageReference Include="TestableIO.System.IO.Abstractions" />

@ -91,7 +91,7 @@ public abstract class ServiceConfigMerger<T> where T : ServiceConfigYaml
return Combine(a, b, (a1, b1) =>
{
return a1
.FullOuterJoin(b1, JoinType.Hash,
.FullOuterHashJoin(b1,
x => x.Name,
x => x.Name,
l => l,

@ -30,7 +30,7 @@ public sealed class CustomFormatDataEqualityComparer : IEqualityComparer<CustomF
}
return first
.FullOuterJoin(second, JoinType.Hash, x => x.Name, x => x.Name, _ => false, _ => false, SpecificationEqual)
.FullOuterHashJoin(second, x => x.Name, x => x.Name, _ => false, _ => false, SpecificationEqual)
.All(x => x);
}
@ -53,7 +53,7 @@ public sealed class CustomFormatDataEqualityComparer : IEqualityComparer<CustomF
}
return first
.FullOuterJoin(second, JoinType.Hash, x => x.Name, x => x.Name, _ => false, _ => false, FieldEqual)
.FullOuterHashJoin(second, x => x.Name, x => x.Name, _ => false, _ => false, FieldEqual)
.All(x => x);
}

Loading…
Cancel
Save