Пример #1
0
        /// <summary>
        /// Writes a BSON DateTime to the writer.
        /// </summary>
        /// <param name="value">The number of milliseconds since the Unix epoch.</param>
        public override void WriteDateTime(long value)
        {
            if (Disposed)
            {
                throw new ObjectDisposedException("BsonBinaryWriter");
            }
            if (State != BsonWriterState.Value)
            {
                ThrowInvalidState("WriteDateTime", BsonWriterState.Value);
            }

            _bsonStream.WriteBsonType(BsonType.DateTime);
            WriteNameHelper();
            _bsonStream.WriteInt64(value);

            State = GetNextState();
        }
Пример #2
0
        static int _m_WriteInt64(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);



                {
                    long _value = LuaAPI.lua_toint64(L, 2);

                    gen_to_be_invoked.WriteInt64(_value);



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