コード例 #1
0
 protected void Edit_Button_OnClick(object sender, RoutedEventArgs e)
 {
     if (!Value)
     {
         SetValueCommand.Execute(Main);
     }
 }
コード例 #2
0
 protected override void EditButton_OnClick(object sender, RoutedEventArgs e)
 {
     if (Value)
     {
         SetValueCommand.Execute(Alternate);
     }
 }
コード例 #3
0
ファイル: RedisClient.cs プロジェクト: yonglehou/Symbiote
        public bool Set <T>(string key, T value)
        {
            ValidateKeyVal(key);
            ValidateInputValueNotDefault(value);
            var command = new SetValueCommand <T>(key, value);

            return(command.Execute());
        }
コード例 #4
0
        public void CreateAndExecuteSetValueCommand()
        {
            IExpression     expression = new ConstantExpression(1);
            SetValueCommand cmd        = new SetValueCommand("one", expression);

            Assert.AreEqual(expression, cmd.Expression);
            Assert.AreEqual("one", cmd.Name);
            Context context = new Context();

            cmd.Execute(context);
            Assert.AreEqual(1, context.GetValue("one"));
        }