protected ConsoleTerminalBase(ConsoleCommandContextBase commandContext) : base(commandContext) { this.commandContext = commandContext; this.commandContext.PathChanged += CommandContext_PathChanged; this.commandContext.Executed += CommandContext_Executed; this.commandContext.Terminal = this; this.Postfix = this.PostfixInternal; this.IsCommandMode = true; }
public void Password(string userID) { var user = this.UserContext.Dispatcher.Invoke(() => this.GetUser(userID)); var password1 = this.CommandContext.ReadSecureString("Password1:"); var password2 = this.CommandContext.ReadSecureString("Password2:"); ConsoleCommandContextBase.Validate(password1, password2); this.UserContext.Dispatcher.Invoke(() => { var authentication = this.CommandContext.GetAuthentication(this); user.ChangeUserInfo(authentication, null, password1, null, null); }); }