Пример #1
0
        public void TestPv2BoolParamType(string paramName, string description, string @group, bool defaultValue, string trueString, string falseString, Pv2ParamFlags flags)
        {
            SpanTestHelper.SerializeDeserializeTestBegin(_output.WriteLine);
            var type = new Pv2BoolParamType(paramName, description, @group, defaultValue, trueString, falseString, flags);

            ValidateParamType <bool, Pv2BoolParamType, Pv2BoolParamValue>(type, _output.WriteLine);
            ValidateParamValue <bool, Pv2BoolParamType, Pv2BoolParamValue>(type, true, _output.WriteLine);
            ValidateParamValue <bool, Pv2BoolParamType, Pv2BoolParamValue>(type, false, _output.WriteLine);
        }
Пример #2
0
 public static IObservable <bool> FilterBool(this IObservable <Pv2ParamValueAndTypePair> src,
                                             Pv2BoolParamType type)
 {
     return(src.Filter <Pv2BoolParamType, Pv2BoolParamValue, bool>(type));
 }
Пример #3
0
 public static bool GetValueFromConfig(this Pv2BoolParamType src, IConfiguration config,
                                       string configSuffix)
 {
     return(src.GetValue(src.ReadFromConfig(config, configSuffix)));
 }