protected ConsoleTerminalBase(ConsoleCommandContextBase commandContext) : base(commandContext) { this.commandContext = commandContext; this.commandContext.PathChanged += CommandContext_PathChanged; this.commandContext.Executed += CommandContext_Executed; this.commandContext.Terminal = this; this.IsCommandMode = true; }
public async Task PasswordAsync([CommandCompletion(nameof(GetUserIDsAsync))] string userID) { var user = await this.GetUserAsync(userID); var password1 = this.CommandContext.ReadSecureString("Password1:"); var password2 = this.CommandContext.ReadSecureString("Password2:"); ConsoleCommandContextBase.Validate(password1, password2); var authentication = this.CommandContext.GetAuthentication(this); await user.SetPasswordAsync(authentication, null, password1); }