{#/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */#} class FfiConverterBoolean: FfiConverter { public static FfiConverterBoolean INSTANCE = new FfiConverterBoolean(); public override bool Lift(sbyte value) { return value != 0; } public override bool Read(BigEndianStream stream) { return Lift(stream.ReadSByte()); } public override sbyte Lower(bool value) { return value ? (sbyte)1 : (sbyte)0; } public override int AllocationSize(bool value) { return (sbyte)1; } public override void Write(bool value, BigEndianStream stream) { stream.WriteSByte(Lower(value)); } }