Skip to content

Consider whether service resolution needs to be in the public API #1919

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

Closed
Tracked by #1891
jonsequitur opened this issue Nov 2, 2022 · 1 comment
Closed
Tracked by #1891

Comments

@jonsequitur
Copy link
Contributor

jonsequitur commented Nov 2, 2022

    public class BindingContext : IServiceProvider 
    {
        public IConsole Console { get; }
        public ParseResult ParseResult { get; }
        // What are the scenarios for this?  I can't imagine a "service" in context here.
        // If there are better words, then use better words, and if implementing IServiceProvider is important, then
        // just explicitly implement IServiceProvider.GetService to alias it to the better name.
        public void AddService(Type serviceType, Func<IServiceProvider,object> factory);
        public void AddService<T>(Func<IServiceProvider,T> factory);
        public object GetService(Type serviceType);
    }
@adamsitnik
Copy link
Member

fixed by #2093

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants