Inheritance: INotifyPropertyChanged
示例#1
0
 public static void SetParamValueOnMatching(this IEnumerable<Param> that, Param updatedParam)
 {
     foreach (var param in that.Where(p => p.Name.EqualsIC(updatedParam.Name)))
     {
         param.Value = updatedParam.Value;
     }
 }
示例#2
0
 public void Get_parsed_arguments()
 {
     var p = new Param(typeof(string), "name", new ArgumentWithOptions(new ArgumentParameter("name", new[] { "name" })));
     var c = new[]{ p }.GetParsedArguments();
     Assert.That(c.RecognizedArguments.Count(), Is.EqualTo(0));
     Assert.That(c.UnRecognizedArguments.Count(), Is.EqualTo(0));
     Assert.That(c.ArgumentWithOptions.Count(), Is.EqualTo(1));
 }
示例#3
0
 public void Changing_the_value_of_param_will_trigger_callback()
 {
     var p = new Param(typeof(string), "name", new ArgumentWithOptions(new ArgumentParameter("name", new []{"name"})));
     bool triggered = false;
     p.PropertyChanged += (s, arg) => { triggered = true; };
     p.Value = "val";
     Assert.That(triggered);
 }
示例#4
0
 public void Changing_the_value_of_param_without_callback()
 {
     var p = new Param(typeof(string), "name", new ArgumentWithOptions(new ArgumentParameter("name", new[] { "name" })));
     p.Value = "val";
 }