/// <inheritdoc/> public Command Build() { var command = this.commandFactory(); return(command is RootCommand _ ? throw Exceptions.BuildInvalidOperationBuiltRootCommand() : command); }