Пример #1
0
        public override IByteBuffer WriteZero(int length)
        {
            this.EnsureWritable(length);
            int wIndex = this.WriterIndex;

            UnsafeByteBufferUtil.SetZero(this.Addr(wIndex), length);
            this.SetWriterIndex(wIndex + length);
            return(this);
        }
 public sealed override IByteBuffer SetZero(int index, int length)
 {
     CheckIndex(index, length);
     fixed (byte* addr = &Addr(index))
     {
         UnsafeByteBufferUtil.SetZero(addr, length);
         return this;
     }
 }
Пример #3
0
        public override IByteBuffer SetZero(int index, int length)
        {
            this.CheckIndex(index, length);

            fixed(byte *addr = &this.Addr(index))
            UnsafeByteBufferUtil.SetZero(addr, length);

            return(this);
        }
        public sealed override IByteBuffer WriteZero(int length)
        {
            if (0u >= (uint)length) { return this; }

            _ = EnsureWritable(length);
            int wIndex = WriterIndex;
            CheckIndex0(wIndex, length);
            fixed (byte* addr = &Addr(wIndex))
            {
                UnsafeByteBufferUtil.SetZero(addr, length);
            }
            _ = SetWriterIndex(wIndex + length);

            return this;
        }
Пример #5
0
        public sealed override IByteBuffer WriteZero(int length)
        {
            if (0u >= (uint)length)
            {
                return(this);
            }

            _ = EnsureWritable(length);
            int wIndex = WriterIndex;

            CheckIndex0(wIndex, length);
            UnsafeByteBufferUtil.SetZero(Addr(wIndex), length);
            _ = SetWriterIndex(wIndex + length);

            return(this);
        }
Пример #6
0
 public override IByteBuffer SetZero(int index, int length)
 {
     this.CheckIndex(index, length);
     UnsafeByteBufferUtil.SetZero(this.Addr(index), length);
     return(this);
 }