#pragma warning restore 618 /// <summary> /// Writes a BSON Boolean to the writer. /// </summary> /// <param name="value">The Boolean value.</param> public override void WriteBoolean(bool value) { if (Disposed) { throw new ObjectDisposedException("BsonBinaryWriter"); } if (State != BsonWriterState.Value) { ThrowInvalidState("WriteBoolean", BsonWriterState.Value); } _bsonStream.WriteBsonType(BsonType.Boolean); WriteNameHelper(); _bsonStream.WriteBoolean(value); State = GetNextState(); }
static int _m_WriteBoolean(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); { bool _value = LuaAPI.lua_toboolean(L, 2); gen_to_be_invoked.WriteBoolean(_value); return(0); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } }