Closed thall90 closed 5 years ago
Hi,
This is the same problem as with VSCode #83. However, as I know, Rider supports also Code Refactorings from NuGet packages. I will try to release a nuget package with Mapping Generator in the next week. I will let you know when it is ready.
That's incredible! Thank you!
Also, if there are any contributions that could accelerate this process, I would love to help!
Ok, I've updated the NuGet package, Can you test it? Especially mapping between collections.
Sure thing! I'll let you know once I've done so
I've added the NuGet package to my project, I'm not seeing any of the context actions. Is the mechanism for generating a mapping different when using the NuGet variant?
What version of the Rider are you using? Refactoring options should be available in the menu triggered by the alt+enter
shortcut.
I'm using version 2019.2
. I'm not seeing any of the mapping function actions in the alt+enter
menu.
Can you provide the sample code?
@thall90 do you still experience a problem with Rider? I observed that after updating nuget package restart is required to load a new version.
@cezarypiatek I apologize for the delay in getting back to you. After installing the package and restarting Rider, I am indeed able to access the Mapping actions from the alt+enter
context menu.
Testing with the following classes: `public class TestMapOrigin { public Guid TestId { get; set; }
public string TestName { get; set; }
public bool IsActive { get; set; }
public ICollection<Guid> IdCollection { get; set; }
}
public class TestMapDestination { public Guid TestId { get; private set; }
public string TestName { get; private set; }
public bool IsActive { get; private set; }
public ICollection<Guid> IdCollection { get; private set; }
public TestMapDestination(
Guid testId,
string testName,
bool isActive,
ICollection<Guid> idCollection)
{
TestId = testId;
TestName = testName;
IsActive = isActive;
IdCollection = idCollection;
}
}`
I achieved the following result:
public static TestMapDestination Map( this TestMapOrigin inputDTO) { return new TestMapDestination(testId: inputDTO.TestId, testName: inputDTO.TestName, isActive: inputDTO.IsActive, idCollection: inputDTO.IdCollection); }
I was also able to achieve positive object initializer results with public setters on the TestDestination
class.
I would say that this package is good-to-go!
Thank you so much for your help, and for your consistent, prompt responses.
@thall90 thanks for your time and confirming that MappingGenerator works on Rider.
This plugin was an indispensable part of my everyday development while developing using Visual Studio. However, now that I've switched to JetBrains Rider, I really miss the functionality that this plugin provided.
Do you have any intentions of creating a Rider plugin port for this tool?