Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

No options required #136

Closed
wants to merge 1 commit into from
Closed

No options required #136

wants to merge 1 commit into from

Conversation

lbargaoanu
Copy link
Member

@lbargaoanu lbargaoanu commented Jul 2, 2020

It seems pretty basic to me.

@lbargaoanu lbargaoanu force-pushed the no_options branch 9 times, most recently from 9be0008 to 40e65a3 Compare July 2, 2020 06:53
if (services.Any(sd => sd.ServiceType == typeof(IMapper)))
return services;

var sd = services.FirstOrDefault(sd => sd.ServiceType == typeof(IConfigurationProvider));
Copy link
Member

Choose a reason for hiding this comment

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

This is what the Options stuff does, though. Why create our own factory, and leverage something out-of-the-box instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not out of the box :) You have to add a package reference for how many lines of code, maybe five? I don't see the point.

Copy link
Member

Choose a reason for hiding this comment

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

I don't mind a package reference in a library that is meant to support a specific package reference though, and in a way that is more or less the design of what this factory does.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it just makes things more difficult to understand. Abstraction over clarity. My initial impression was that it might enable some client use cases, but I guess not.

@lbargaoanu lbargaoanu closed this Jul 2, 2020
@lbargaoanu lbargaoanu deleted the no_options branch July 2, 2020 18:15
@github-actions
Copy link

github-actions bot commented Sep 6, 2020

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants