public void TestMantissaAndExponent() { var value = new DecimalValue(9427.55); AssertEquals(942755, value.mantissa); AssertEquals(-2, value.exponent); value = new DecimalValue(942755, -2); AssertEquals(((decimal)9427.55), value.ToBigDecimal()); }
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)); }
public void SetDecimal(int fieldIndex, Decimal value) { _values[fieldIndex] = new DecimalValue(value); }
public void TestMaxValue() { var max = new DecimalValue(int.MaxValue, 10); AssertEquals(new Decimal(2147483647e10), max.ToBigDecimal()); }
public virtual void SetDecimal(int fieldIndex, Decimal value_Renamed) { values[fieldIndex] = new DecimalValue(value_Renamed); }
public void SetDecimal(int fieldIndex, Decimal value) { _values[fieldIndex] = new DecimalValue(value); }
public bool equals(DecimalValue other) { return(other.mantissa == mantissa && other.exponent == exponent); }
public virtual void SetDecimal(int fieldIndex, Decimal value_Renamed) { values[fieldIndex] = new DecimalValue(value_Renamed); }
public bool equals(DecimalValue other) { return other.mantissa == mantissa && other.exponent == exponent; }