public Creator(ICharService service, IMudConfiguration config) { this.service = service ?? throw new ArgumentNullException(nameof(service)); this.config = config ?? throw new ArgumentNullException(nameof(config)); this.Action[UserStatus.Create] = this.Create; this.Action[UserStatus.GetNameNom] = this.GetNameNom; this.Action[UserStatus.GetNameGen] = this.GetNameGen; this.Action[UserStatus.GetNameDat] = this.GetNameDat; this.Action[UserStatus.GetNameAcc] = this.GetNameAcc; this.Action[UserStatus.GetNameIns] = this.GetNameIns; this.Action[UserStatus.GetNamePre] = this.GetNamePre; this.Action[UserStatus.GetGender] = this.GetGender; this.Action[UserStatus.CreatePassword] = this.CreatePassword; this.Action[UserStatus.ConfirmPassword] = this.ConfirmPassword; this.Action[UserStatus.GetEmail] = this.GetEmail; this.Action[UserStatus.ConfirmCheck] = this.ConfirmCheck; this.Prompt[UserStatus.GetNameNom] = "Введите имя персонажа в именительном падеже – здесь стоит кто?"; this.Prompt[UserStatus.GetNameGen] = "Родительный – это вещи кого?"; this.Prompt[UserStatus.GetNameDat] = "Дательный – дать денег кому?"; this.Prompt[UserStatus.GetNameAcc] = "Винительный – позвать кого?"; this.Prompt[UserStatus.GetNameIns] = "Творительный – сражаться с кем?"; this.Prompt[UserStatus.GetNamePre] = "Предложный – думать о ком?"; this.Prompt[UserStatus.GetGender] = "Укажите пол персонажа (м/ж/с)"; this.Prompt[UserStatus.CreatePassword] = "Придумайте пароль"; this.Prompt[UserStatus.ConfirmPassword] = "Повторите пароль для проверки"; this.Prompt[UserStatus.GetEmail] = "Укажите электронный адрес на всякий случай"; this.Prompt[UserStatus.ConfirmCheck] = "Проверьте, все ли правильно:"; }
public FileCharService(IMudConfiguration config, ITranslitConverter converter, IFileService <ProtoChar> fileService) { this.config = config ?? throw new ArgumentNullException(nameof(config)); this.converter = converter ?? throw new ArgumentNullException(nameof(converter)); this.fileService = fileService ?? throw new ArgumentNullException(nameof(fileService)); }
public InputHandlerChain(ICommandHandler commandHandler, ICharService charService, IMudConfiguration config, IWorldKeeper worldKeeper) { (this.chain = new Disconnecter()) .Then(new Cleanser()) .Then(new Echo()) .Then(new Commander(commandHandler)) .Then(new Authenticator(charService)) .Then(new Creator(charService, config)) .Then(new Launcher(charService, commandHandler, worldKeeper)); }
public FileAreaLoader(IMudConfiguration config, IFileService <ProtoArea> fileService, IMudLogger log) { this.fileService = fileService ?? throw new ArgumentNullException(nameof(fileService)); this.config = config ?? throw new ArgumentNullException(nameof(config)); this.log = log ?? throw new ArgumentNullException(nameof(log)); }