Exemplo n.º 1
0
        public void CloseInput()
        {
            MemoryStream ms = new MemoryStream();
            BsonReader reader = new BsonReader(ms);

            Assert.True(ms.CanRead);
            reader.Close();
            Assert.False(ms.CanRead);

            ms = new MemoryStream();
            reader = new BsonReader(ms) { CloseInput = false };

            Assert.True(ms.CanRead);
            reader.Close();
            Assert.True(ms.CanRead);
        }