DeagleGross / SharpCoachPlugin

Rider C# plugin for easy code generation of mapping classes
MIT License
4 stars 2 forks source link

Incorrect dictionary mapping #3

Open DeagleGross opened 3 years ago

DeagleGross commented 3 years ago

Describe the bug Incorrect dictionary mapping

To Reproduce Steps to reproduce the behavior:

public class Version { public long Id { get; set; }
public string Name { get; set; } }

- getting such a result

Versions = new Dictionary() { Comparer = request.Versions.Comparer, Count = request.Versions.Count, Item = request.Versions.Item, Keys = request.Versions.Keys, Values = request.Versions.Values }


**Expected behavior**
Dictionary should map correctly:

Versions = request.Versions.ToDictionary(pair => pair.Key, pair => new UserResponse.Version { Id = pair.Value.Id, Name = pair.Value.Name })



**Screenshots**
This is how it is working now:
![image](https://user-images.githubusercontent.com/31598696/132141963-1e4cc80e-8ca5-41f6-a715-2d498765c231.png)

**Desktop:**
 - Rider version `2021.2`, `212.4746.114`