Skip to content

Change CecilSymbolHelper to instance class #846

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

daveMueller
Copy link
Collaborator

@daveMueller daveMueller commented May 13, 2020

closes #774

Copy link
Collaborator

@MarcoRossignoli MarcoRossignoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits generally looks good!Thanks!

@MarcoRossignoli MarcoRossignoli added the enhancement General enhancement request label May 14, 2020
Copy link
Collaborator

@MarcoRossignoli MarcoRossignoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another round, missed some style nits sorry and thanks

{
// Create single instance, we cannot collide because we use full method name as key
CompilerGeneratedBranchesToExclude = new ConcurrentDictionary<string, int[]>();
_compilerGeneratedBranchesToExclude = new ConcurrentDictionary<string, int[]>();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can initialize inline and remove ctor, before we wanted to be sure single thread initialization, now we use an singleton instance so no double init issue. Keep the comment above pls.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -88,7 +90,8 @@ static int Main(string[] args)
logger,
serviceProvider.GetService<IInstrumentationHelper>(),
fileSystem,
sourceTranslator);
sourceTranslator,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use serviceProvider.GetRequiredService everywhere where we don't use variable for more than one place?I see some assignation above, sourceTranslator is used in more than one place?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@MarcoRossignoli MarcoRossignoli merged commit 4974550 into coverlet-coverage:master Jun 4, 2020
@daveMueller daveMueller deleted the 774_RefactoreCecilSymbolHelper branch October 27, 2023 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General enhancement request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change CecilSymbolHelper as instance class and inject with DI
2 participants