Bend.EmailIndexerTest.EmailInjector.UnixReadLine C# (CSharp) Method

UnixReadLine() public static method

public static UnixReadLine ( Stream stream ) : string
stream Stream
return string
        public static string UnixReadLine(Stream stream)
        {
            string line = "";
            while (stream.Position < stream.Length - 1) {

                int ch = stream.ReadByte();
                if (ch != 10) {
                    line = line + Char.ConvertFromUtf32(ch);
                } else {
                    return line;
                }
            }
            return "";
        }