Beispiel #1
0
        /// <summary>
        ///     Adds the byte, and one random byte after it to avoid memory leaking
        /// </summary>
        /// <exception cref="ObjectDisposedException">Throws if the SafeBytes instance is disposed</exception>
        public void Append(byte b)
        {
            EnsureNotDisposed();
            var safeByte = _safeByteFactory.GetByByte(b);

            _safeByteCollection.Append(safeByte);
        }
Beispiel #2
0
        public void GetByByte_Takes_Less_Than_2ms()
        {
            const double expectedMax = 100;
            var          actual      = base.Measure(() => _sut.GetByByte((byte)5));

            Assert.That(actual, Is.LessThan(expectedMax));
        }