public CommandResult Process(CommandInfo info, Repository repository) { info.CheckArity(0); string key = info.Key; return(new CommandResult(repository.GetValue(key))); }
public CommandResult Process(CommandInfo info, Repository repository) { info.CheckArity(0); string key = info.Key; return new CommandResult(repository.GetValue(key)); }
public CommandResult Process(CommandInfo info, Repository repository) { info.CheckArity(1); string key = info.Key; object value = info.Parameters[0]; repository.SetValue(key, value); return(ok); }
public CommandResult Process(CommandInfo info, Repository repository) { info.CheckArity(1); string key = info.Key; object value = info.Parameters[0]; repository.SetValue(key, value); return ok; }
public CommandResult Process(CommandInfo info, Repository repository) { info.CheckArity(1); string key = info.Key; if (info.Parameters[0] is ulong) { ulong value = (ulong)info.Parameters[0]; return new CommandResult(repository.SetHasMember(key, value)); } else { string value = (string)info.Parameters[0]; return new CommandResult(repository.SetHasMember(key, value)); } }
public CommandResult Process(CommandInfo info, Repository repository) { info.CheckArity(1); string key = info.Key; if (info.Parameters[0] is ulong) { ulong value = (ulong)info.Parameters[0]; repository.SetRemoveMember(key, value); } else { string value = (string)info.Parameters[0]; repository.SetRemoveMember(key, value); } return(ok); }