Ejemplo n.º 1
0
        /// <summary>
        /// Writes a BSON Double to the writer.
        /// </summary>
        /// <param name="value">The Double value.</param>
        public override void WriteDouble(double value)
        {
            if (Disposed)
            {
                throw new ObjectDisposedException("BsonBinaryWriter");
            }
            if (State != BsonWriterState.Value)
            {
                ThrowInvalidState("WriteDouble", BsonWriterState.Value);
            }

            _bsonStream.WriteBsonType(BsonType.Double);
            WriteNameHelper();
            _bsonStream.WriteDouble(value);

            State = GetNextState();
        }
Ejemplo n.º 2
0
        static int _m_WriteDouble(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);



                {
                    double _value = LuaAPI.lua_tonumber(L, 2);

                    gen_to_be_invoked.WriteDouble(_value);



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