RiakClient.Erlang.OtpInputStream.ReadBoolean C# (CSharp) Method

ReadBoolean() public method

Read an Erlang atom from the stream and interpret the value as a boolean.
public ReadBoolean ( ) : bool
return bool
        public bool ReadBoolean()
        {
            string atom = ReadAtom();
            return bool.Parse(atom);
        }

Usage Example

 public void Read_Boolean(byte[] buf, bool want)
 {
     using (var s = new OtpInputStream(buf))
     {
         Assert.AreEqual(want, s.ReadBoolean());
     }
 }