ReadSingleAsync() public méthode

public ReadSingleAsync ( ) : Task
Résultat Task
        public async Task SingleTestAsync()
        {
            MemoryStream memStream = new MemoryStream();
            BigEndianStream bigEndianStream = new BigEndianStream(memStream);

            var testByte1 = float.MaxValue;
            var testByte2 = float.MinValue;

            await bigEndianStream.WriteAsync(testByte1);
            await bigEndianStream.WriteAsync(testByte2);

            memStream.Seek(0, SeekOrigin.Begin);

            Assert.AreEqual(await bigEndianStream.ReadSingleAsync(), testByte1);
            Assert.AreEqual(await bigEndianStream.ReadSingleAsync(), testByte2);
            Assert.AreEqual(memStream.Position, memStream.Length);
        }