CommandBuilder <TC> BuildFromName <TC>(string name, ICommandBuildingConventions conventions) where TC : ICommand { var builder = new CommandBuilder <TC>(_commandCoordinator, _conventions); builder.WithName(conventions.CommandName(name)); return(builder); }
/// <summary> /// Initializes a new instance of <see cref="CommandBuilder"/> /// </summary> /// <param name="commandCoordinator"><see cref="ICommandCoordinator"/> to use</param> public CommandBuilder(ICommandCoordinator commandCoordinator, ICommandBuildingConventions conventions) { _commandCoordinator = commandCoordinator; _conventions = conventions; if (typeof(T) != typeof(Command) && typeof(T) != typeof(ICommand)) { Name = conventions.CommandName(typeof(T).Name); } }