Closed
Description
Both AnalyzeControlFlow and AnalyzeDataFlow are marked internal within SemanticModel.
They're exposed via extension methods in ModelExtensions.AnalyzeControlFlow and ModelExtension.AnalyzeDataFlow
I don't think accessing these methods through extension methods provides any value. I propose the extension methods be removed (for the above methods, and their other overload) and we simply mark the corresponding methods within SemanticModel as public.
If the team agrees, I can go ahead and submit a PR for this.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
[-]Make SemanticModel 's Analyze*Flow methods public. Remove extension methods.[/-][+]Make SemanticModel's Analyze*Flow methods public. Remove extension methods.[/+][-]Make SemanticModel's Analyze*Flow methods public. Remove extension methods.[/-][+]Make SemanticModel's Analyze*Flow methods public. Remove corresponding extension methods.[/+]jmarolf commentedon Jan 31, 2015
This looks like a mistake from when we unified the interface ISemanticModel to the abstract class SemanticModel. Go ahead and submit a PR.
gafter commentedon Jan 31, 2015
If I recall, the language-specific extension methods are type safe (e.g. Taking language-specific StatementSyntax)
JoshVarty commentedon Jan 31, 2015
There are language-specific extension methods and they should be left alone.
But I don't think that the language-agnostic extension methods serve a purpose that wouldn't be achieved by making the following methods public instead of internal.
DustinCampbell commentedon Feb 4, 2015
That seems fair to me.
JoshVarty commentedon Feb 6, 2015
As discussed in #190 this is by design.