Example #1
0
        /// <inheritdoc />
        public override void WriteDecimal128(Decimal128 value)
        {
            if (Disposed)
            {
                throw new ObjectDisposedException("BsonBinaryWriter");
            }
            if (State != BsonWriterState.Value)
            {
                ThrowInvalidState(nameof(WriteDecimal128), BsonWriterState.Value);
            }

            _bsonStream.WriteBsonType(BsonType.Decimal128);
            WriteNameHelper();
            _bsonStream.WriteDecimal128(value);

            State = GetNextState();
        }
        static int _m_WriteDecimal128(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                MongoDB.Bson.IO.BsonStream gen_to_be_invoked = (MongoDB.Bson.IO.BsonStream)translator.FastGetCSObj(L, 1);



                {
                    MongoDB.Bson.Decimal128 _value; translator.Get(L, 2, out _value);

                    gen_to_be_invoked.WriteDecimal128(_value);



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }