コード例 #1
0
        private void WriteNumeric(CtpNumeric value)
        {
            EnsureCapacityBytes(4 + 4 + 4 + 1 + 1);

            if (value.High != 0)
            {
                WriteNumericHelper(CtpObjectSymbols.NumericHigh, value.Flags, value.High);
                WriteBits32(value.Mid);
                WriteBits32(value.Low);
            }
            else if (value.Mid != 0)
            {
                WriteNumericHelper(CtpObjectSymbols.NumericMid, value.Flags, value.Mid);
                WriteBits32(value.Low);
            }
            else if (value.Low != 0)
            {
                WriteNumericHelper(CtpObjectSymbols.NumericLow, value.Flags, value.Low);
            }
            else
            {
                WriteBits8(CtpObjectSymbols.NumericNone, value.Flags);
            }
        }
コード例 #2
0
 private CtpObject(CtpNumeric value)
     : this()
 {
     ValueTypeCode = CtpTypeCode.Numeric;
     UnsafeNumeric = value;
 }