コード例 #1
0
 public static void SetParamValueOnMatching(this IEnumerable<ParamViewModel> that, ParamViewModel updatedParam)
 {
     foreach (var param in that.Where(p => p.Name.Equals(updatedParam.Name, StringComparison.InvariantCultureIgnoreCase)))
     {
         param.Value = updatedParam.Value;
     }
 }
コード例 #2
0
 public void Changing_the_value_of_param_will_trigger_callback()
 {
     var p = new ParamViewModel(GetParam());
     bool triggered = false;
     p.PropertyChanged += (s, arg) => { triggered = true; };
     p.Value = "val";
     Assert.That(triggered);
 }
コード例 #3
0
 public void Changing_the_value_of_param_without_callback()
 {
     var p = new ParamViewModel(GetParam());
     p.Value = "val";
 }
コード例 #4
0
ファイル: ParamExtension.cs プロジェクト: ozzymcduff/isop-wpf
 public static void SetParamValueOnMatching(this IEnumerable <ParamViewModel> that, ParamViewModel updatedParam)
 {
     foreach (var param in that.Where(p => p.Name.Equals(updatedParam.Name, StringComparison.InvariantCultureIgnoreCase)))
     {
         param.Value = updatedParam.Value;
     }
 }