Skip to content

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

@jonsequitur

Description

@jonsequitur
    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);
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions