Repository navigation
VB -> C# use project context - #28
Merged
Merged
Conversation
We'd probably get a better conversion out of converting a whole file then picking a subset, but since I don't actually understand the use case, the effort isn't really worth it here.
This only kicks in when the runtime is already having difficulty finding the required assembly anyway. This way we be sure of compatibility with the latest version if we compile against the latest assembly shipped with VS, then just hope for compatibility with older versions. The alternative is to compile against the oldest versions of the assemblies for a version of VS we care about, and rely on Visual Studio's own binding redirects (or our advice to it in assemblyinfo) to sort things out. The APIs we're using are quite stable, but I'd rather old versions break than new versions since "please upgrade VS" is a better response to a bug report than "please downgrade VS". If we get lots of MissingMethodException bug reports, we'll have to reconsider this.
The benefit over converting just the selected characters is that we're converting what's hopefully a well formed document, so the rest of the document can be used for context, and returning something that represents a node, rather than trying to convert the text "tring", when someone slightly mis-selects. If two layers of the node hierarachy fail to go through the trivia converter, then the whole document will be converted, which seems like an OK failure case.
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses VB -> C# part of #9
Also fixes #13