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); } }
private CtpObject(CtpNumeric value) : this() { ValueTypeCode = CtpTypeCode.Numeric; UnsafeNumeric = value; }