Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lt 5595 migrate to net 8 new #556

Merged
merged 8 commits into from
Sep 17, 2024
Merged

Lt 5595 migrate to net 8 new #556

merged 8 commits into from
Sep 17, 2024

Conversation

tarurar
Copy link
Member

@tarurar tarurar commented Sep 16, 2024

No description provided.

Copy link

Code Coverage

Package Line Rate Branch Rate Complexity Health
MarginTrading.AzureRepositories 4% 36% 197
MarginTrading.SqlRepositories 0% 0% 471
MarginTrading.Backend 8% 14% 666
MarginTrading.Common 18% 18% 378
MarginTrading.Backend.Contracts 31% 25% 620
MarginTrading.Backend.Core.Mappers 0% 0% 4
MarginTrading.Backend.Core 66% 59% 1518
MarginTrading.Backend.Services 43% 39% 3294
Summary 37% (6018 / 16433) 35% (1528 / 4327) 7148

@@ -231,7 +231,7 @@ public Dictionary<string, List<CompiledScheduleTimeInterval>> GetMarketsTradingS

try
{
return _compiledMarketScheduleCache.ToDictionary();
return MoreEnumerable.ToDictionary(_compiledMarketScheduleCache);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the [AssetPairsCache] class MoreEnumerable is replaced by

return pairsEnum.DistinctBy(p => p.Item1).ToDictionary();

Here it's the opposite, the normal enumerable replaced by MoreEnumerable
Why is this needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will not be replaced. The MoreLinq extension was used here before so as not to change the behaviour, I continued to use it. A semantic change is required due to a conflict between MoreLinq's implementation of the ToDictionary method and the new implementation of System.Linq in NET 8.

@@ -358,7 +358,7 @@ public Dictionary<string, MarketState> GetMarketState()

try
{
return _marketStates.ToDictionary();
return MoreEnumerable.ToDictionary(_marketStates);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Version>2.32.0</Version>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous version was
2.34.0

@tarurar tarurar merged commit 4061ab3 into master Sep 17, 2024
1 check failed
@tarurar tarurar deleted the LT-5595-migrate-to-net-8-new branch September 17, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants