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));
        }
        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));
        }
Ejemplo n.º 3
0
 public Context()
 {
     dictionaries["global"]   = new GlobalDictionary();
     dictionaries["template"] = new TemplateDictionary();
     dictionaries["type"]     = new ApplicationTypeDictionary();
 }
Ejemplo n.º 4
0
 public Context()
 {
     dictionaries["global"] = new GlobalDictionary();
     dictionaries["template"] = new TemplateDictionary();
     dictionaries["type"] = new ApplicationTypeDictionary();
 }