GetBool() public method

public GetBool ( string key ) : bool
key string
return bool
 public void SetGetBool()
 {
     QuickFix.Dictionary d = new QuickFix.Dictionary();
     d.SetBool("BOOLKEY1", true);
     d.SetBool("BOOLKEY2", false);
     d.SetString("BADBOOLKEY2", "YO");
     Assert.That(d.GetBool("BOOLKEY1"), Is.True);
     Assert.That(d.GetBool("BOOLKEY2"), Is.False);
     Assert.Throws <ConfigError>(delegate { d.GetBool("BOOLKEY3"); });
     Assert.Throws <ConfigError>(delegate { d.GetBool("BADBOOLKEY2"); });
 }
示例#2
0
 public void SetGetBool()
 {
     QuickFix.Dictionary d = new QuickFix.Dictionary();
     d.SetBool("BOOLKEY1", true);
     d.SetBool("BOOLKEY2", false);
     d.SetString("BADBOOLKEY2", "YO");
     Assert.That(d.GetBool("BOOLKEY1"), Is.True);
     Assert.That(d.GetBool("BOOLKEY2"), Is.False);
     Assert.Throws<ConfigError>(delegate { d.GetBool("BOOLKEY3"); });
     Assert.Throws<ConfigError>(delegate { d.GetBool("BADBOOLKEY2"); });
 }
示例#3
0
        private DataDictionary.DataDictionary LoadDataDictionaryFromStream(Dictionary settings, Stream dictionaryStream)
        {
            DataDictionary.DataDictionary dd;
            string path = settings.GetString(SessionSettings.DATA_DICTIONARY_STREAM);

            if (!dictionariesByPath_.TryGetValue(path, out dd))
            {
                dd = new DataDictionary.DataDictionary(dictionaryStream);
                dictionariesByPath_[path] = dd;
            }

            DataDictionary.DataDictionary ddCopy = new DataDictionary.DataDictionary(dd);

            if (settings.Has(SessionSettings.VALIDATE_FIELDS_OUT_OF_ORDER))
                ddCopy.CheckFieldsOutOfOrder = settings.GetBool(SessionSettings.VALIDATE_FIELDS_OUT_OF_ORDER);
            if (settings.Has(SessionSettings.VALIDATE_FIELDS_HAVE_VALUES))
                ddCopy.CheckFieldsHaveValues = settings.GetBool(SessionSettings.VALIDATE_FIELDS_HAVE_VALUES);
            if (settings.Has(SessionSettings.VALIDATE_USER_DEFINED_FIELDS))
                ddCopy.CheckUserDefinedFields = settings.GetBool(SessionSettings.VALIDATE_USER_DEFINED_FIELDS);

            return ddCopy;
        }