Skip to content
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

Fix formatting of CircularDependencyException error message #53140

Merged
merged 2 commits into from
May 24, 2021

Conversation

marek-safar
Copy link
Contributor

to work with trimmed resources

@ghost
Copy link

ghost commented May 23, 2021

Tagging subscribers to this area: @eerhardt, @maryamariyan
See info in area-owners.md if you want to be subscribed.

Issue Details

to work with trimmed resources

Author: marek-safar
Assignees: -
Labels:

area-Extensions-DependencyInjection

Milestone: -

@marek-safar marek-safar merged commit 5a26d12 into dotnet:main May 24, 2021
@marek-safar marek-safar deleted the di3 branch May 24, 2021 06:37
@@ -39,7 +39,7 @@ public void Add(Type serviceType, Type implementationType = null)
private string CreateCircularDependencyExceptionMessage(Type type)
{
var messageBuilder = new StringBuilder();
messageBuilder.AppendFormat(SR.CircularDependencyException, TypeNameHelper.GetTypeDisplayName(type));
messageBuilder.Append(SR.Format(SR.CircularDependencyException, TypeNameHelper.GetTypeDisplayName(type)));
messageBuilder.AppendLine();
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this instead have been:

messageBuilder.AppendLine(SR.Format(SR.CircularDependencyException, TypeNameHelper.GetTypeDisplayName(type)));

? I expect it was only two separate calls previously because there isn't an AppendFormatLine method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could be.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants