johannesegger / extracttypetofilediagnostic Goto Github PK
View Code? Open in Web Editor NEWRoslyn-based diagnostic with code fix for extracting a type into a file with the same name
License: MIT License
Roslyn-based diagnostic with code fix for extracting a type into a file with the same name
License: MIT License
Assert that executing both fixes should extract the types into TypeA.cs
If a fix extracts a type into an existing file, the type should be integrated in a clean way.
If the namespace exists, put it in it.
Otherwise create the namespace declaration and put the type in it.
Also handle nested namespaces.
Non-existing using
directives should be added.
Due to the fact, that we remove and add a document when we want to rename it, Visual Studio closes the document. I couldn't find a way to cleanly rename a file. I tried to add a document with the same id, but VS doesn't seem to like that because it crashed. I also tried to use solution.Workspace.OpenDocument(documentId)
as a work-around, but nothing happened.
There are a lot of repeating code segments which decrease maintainability.
The first option is currently preferred as the basic structure is always the same:
When there's only a single non-nested type within a file, the result should be a simple rename of the file.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.