Comments (17)
Ad1. I need to check that, can you provide a sample solution?
Ad2. "Implement Clone metho" - I don't provide such functionality. You probably confused MappingGenerator with something else.
from mappinggenerator.
Ad2. In the project wiki there is a paragraph
- Generate ICloneable interface implementation - with a gif.
from mappinggenerator.
I added this project https://github.com/bdaniel7/MappingGeneratorTest
So if there is a ":" right after the class name, like when derived or implementing an interface, the Implement clone method menu doesn't appear.
If there is a space between class name and ":", the menu appears.
And Initialize with local values menu appears but doesn't generate anything,
Initialize with sample values menu appears and generates the dummy values.
from mappinggenerator.
Oh, sorry. I totally forgot that I implemented this clone-related feature 😄
Thanks for a sample solution, I will check that later and I will let you know.
from mappinggenerator.
I don't see any problem with "Implement clone" options, works fine in any "space" configuration.
You can also trigger this action directly on the clone method signature:
from mappinggenerator.
"Initialize with local values" - this action is using only local variables and method parameters. It's not using enclosing type members. This is the current behavior.
from mappinggenerator.
Ok, I'm getting the menu when I have the cursor on the class name. Previously I had the cursor just at the end of class name.
But when I try to invoke the action, the IDE freezes. I have to close it from Task Manager. I'm using Rider 2020.2.4
from mappinggenerator.
How large is your solution and how complex is the cloned class?
from mappinggenerator.
Some classes have around 750 lines, including curly braces and empty lines. Other classes have 45 or 75 lines, with just 2 to 10 properties. And some IEquatable<> implementation.
from mappinggenerator.
does it hang on that sample solution too?
from mappinggenerator.
Nope.
from mappinggenerator.
So I guess this is due to solution size. This problem is already reported here #115
I tried to profile MappinGenerator several times but I wasn't able to find anything suspicions. Without real example I'm not able to diagnose this problem.
There are a few async operations which are run synchronously, I need to rewrite it and we will see if that can help.
from mappinggenerator.
Alright, in the meantime I will try a workaround.
from mappinggenerator.
@bdaniel7 might I ask you to test it once again using v1.19.452?
from mappinggenerator.
First, the compilation for the entire solution became waaay slower - when using dotnet watch run
.
Even when just a file is modified.
Which makes the CPU and the fans go crazy...
Then, I got all kinds of warnings that I didn't get before, and that I had to disable with VSTHRD200,VSTHRD103,VSTHRD002,VSTHRD110,VSTHRD003.
from mappinggenerator.
Thanks for quick reply. It's my mistake, the analyzers were referenced incorrectly, should be fixed in v1.19.454
from mappinggenerator.
I'm closing this issue. The case with performance can be tracked here #115
from mappinggenerator.
Related Issues (20)
- NullReferenceException on omitted type parameter HOT 4
- Source Generators HOT 4
- Mapping properties of one type on another HOT 1
- Implement Clone Method refactoring has issues with arrow functions
- Allow different spellings for comparison HOT 6
- Use the existing instance instead of creating a new one HOT 9
- Generate unit tests HOT 3
- Suggestion: Scaffold invocation on multiple lines. HOT 2
- Suggestion: Varying sample data HOT 3
- Could not load type 'MappingGenerator.Features.CodeFixes.ExplicitConversionCodeFixProvider' HOT 12
- How do I "Verify your Roslyn integration option in case you are using R#."? HOT 2
- VSCode extention ? HOT 1
- ValueCollection appears to cause crash on Quick Action HOT 3
- UnitTest generator? HOT 2
- Visual Studio Performance slowing down HOT 1
- Fix NuGet package OnBuildGenerator HOT 4
- Improve interaction with `[InitRequired]` HOT 6
- Mapping from nullable structs to simple value handled incorrectly
- Generating mapping expression for C# 9 positional records HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mappinggenerator.