Exemplo n.º 1
0
 public HelpModule(ApplicationModel appModel,
                   ICommandResolver commandResolver,
                   ICommandNameParser commandNameParser,
                   ICollectionConstructorProvider colCtorProvider)
 {
     _appModel          = appModel ?? throw new ArgumentNullException(nameof(appModel));
     _commandResolver   = commandResolver ?? throw new ArgumentNullException(nameof(commandResolver));
     _commandNameParser = commandNameParser ?? throw new ArgumentNullException(nameof(commandNameParser));
     if (colCtorProvider == null)
     {
         throw new ArgumentNullException(nameof(colCtorProvider));
     }
     _helpWriter = new HelpWriter(colCtorProvider);
 }
 public CommandModelConstructor(ICommandNameParser commandNameParser, IArgumentModelConstructor argumentConstructor)
 {
     _commandNameParser   = commandNameParser ?? throw new ArgumentNullException(nameof(commandNameParser));
     _argumentConstructor = argumentConstructor ?? throw new ArgumentNullException(nameof(argumentConstructor));
 }