Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Support For JetBrains Rider #85

Closed
thall90 opened this issue Aug 25, 2019 · 12 comments
Closed

Support For JetBrains Rider #85

thall90 opened this issue Aug 25, 2019 · 12 comments

Comments

@thall90
Copy link

thall90 commented Aug 25, 2019

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?

@cezarypiatek
Copy link
Owner

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.

@thall90
Copy link
Author

thall90 commented Aug 25, 2019

That's incredible! Thank you!

Also, if there are any contributions that could accelerate this process, I would love to help!

cezarypiatek added a commit that referenced this issue Aug 26, 2019
cezarypiatek added a commit that referenced this issue Aug 26, 2019
@cezarypiatek
Copy link
Owner

Ok, I've updated the NuGet package, Can you test it? Especially mapping between collections.

@thall90
Copy link
Author

thall90 commented Aug 26, 2019

Sure thing! I'll let you know once I've done so

@thall90
Copy link
Author

thall90 commented Aug 29, 2019

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?

@cezarypiatek
Copy link
Owner

What version of the Rider are you using? Refactoring options should be available in the menu triggered by the alt+enter shortcut.

@thall90
Copy link
Author

thall90 commented Aug 29, 2019

I'm using version 2019.2. I'm not seeing any of the mapping function actions in the alt+enter menu.

@cezarypiatek
Copy link
Owner

Can you provide the sample code?

@cezarypiatek
Copy link
Owner

image

image

cezarypiatek added a commit that referenced this issue Aug 31, 2019
@cezarypiatek
Copy link
Owner

@thall90 do you still experience a problem with Rider? I observed that after updating nuget package restart is required to load a new version.

@thall90
Copy link
Author

thall90 commented Sep 5, 2019

@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.

@cezarypiatek
Copy link
Owner

@thall90 thanks for your time and confirming that MappingGenerator works on Rider.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants