Skip to content

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

Closed

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

Activity

  1. added this to the 2.0 GA milestone on Nov 9, 2022
  2. adamsitnik commented on Mar 21, 2023

    @adamsitnik
    Member

    fixed by #2093

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions