Ejemplo n.º 1
0
        public static void AddHelp(this IServiceCollection services, Action<HelpServiceOptions> options = null)
        {
            var helpServiceOptions = new HelpServiceOptions();
            options?.Invoke(helpServiceOptions);

            services.AddSingleton<IHelpService>(svc => new HelpService(svc.GetRequiredService<IGame>(), helpServiceOptions));
        }
Ejemplo n.º 2
0
 public HelpService(IGame game, HelpServiceOptions options)
 {
     _game = game;
     _options = options;
 }