コード例 #1
0
        public void TestExistingTemplateValueLookup()
        {
            Dictionary dictionary = new TemplateDictionary();
            Group template = new MessageTemplate("Position",
                    new Field[] {
                    new Scalar("exchange", FASTType.STRING, Operator.COPY, ScalarValue.UNDEFINED, false)
                });
            ScalarValue value = new StringValue("NYSE");
            dictionary.Store(template, FastConstants.ANY_TYPE, new QName("exchange"), value);

            Assert.AreEqual(ScalarValue.UNDEFINED, dictionary.Lookup(template, new QName("bid"), FastConstants.ANY_TYPE));
        }
コード例 #2
0
        public void TestLookupMultipleValuesForTemplate()
        {
            Dictionary dictionary = new TemplateDictionary();
            Group template = new MessageTemplate("Position",
                    new Field[] {
                    new Scalar("exchange", FASTType.STRING, Operator.COPY, ScalarValue.UNDEFINED, false)
                });
            ScalarValue value = new StringValue("NYSE");
            ScalarValue marketValue = new DecimalValue(100000.00);
            dictionary.Store(template, FastConstants.ANY_TYPE, new QName("exchange"), value);
            dictionary.Store(template, FastConstants.ANY_TYPE, new QName("marketValue"), marketValue);

            Assert.IsFalse(value.Equals(ScalarValue.UNDEFINED));
            Assert.AreEqual(value, dictionary.Lookup(template, new QName("exchange"), FastConstants.ANY_TYPE));
            Assert.AreEqual(marketValue, dictionary.Lookup(template, new QName("marketValue"), FastConstants.ANY_TYPE));
        }
コード例 #3
0
ファイル: Context.cs プロジェクト: radtek/Gradual
 public Context()
 {
     dictionaries["global"]   = new GlobalDictionary();
     dictionaries["template"] = new TemplateDictionary();
     dictionaries["type"]     = new ApplicationTypeDictionary();
 }
コード例 #4
0
 public Context()
 {
     dictionaries["global"] = new GlobalDictionary();
     dictionaries["template"] = new TemplateDictionary();
     dictionaries["type"] = new ApplicationTypeDictionary();
 }