Пример #1
0
        public override Task WriteFrameAsync(bool isKeyFrame, byte[] frameData, int startIndex, int length)
        {
            Argument.IsNotNull(frameData, nameof(frameData));
            Argument.IsNotNegative(startIndex, nameof(startIndex));
            Argument.IsPositive(length, nameof(length));
            Argument.ConditionIsMet(startIndex + length <= frameData.Length, "End offset exceeds the length of frame data.");

            return(writeInvoker.InvokeAsync(() => base.WriteFrame(isKeyFrame, frameData, startIndex, length)));
        }
        public override Task WriteBlockAsync(byte[] data, int startIndex, int length)
        {
            Argument.IsNotNull(data, nameof(data));
            Argument.IsNotNegative(startIndex, nameof(startIndex));
            Argument.IsPositive(length, nameof(length));
            Argument.ConditionIsMet(startIndex + length <= data.Length, "End offset exceeds the length of data.");

            return(writeInvoker.InvokeAsync(() => base.WriteBlock(data, startIndex, length)));
        }
Пример #3
0
 public override Task WriteBlockAsync(byte[] data, int startIndex, int length)
 {
     return(writeInvoker.InvokeAsync(() => base.WriteBlock(data, startIndex, length)));
 }
Пример #4
0
 public override Task WriteFrameAsync(bool isKeyFrame, byte[] frameData, int startIndex, int length)
 {
     return(writeInvoker.InvokeAsync(() => base.WriteFrame(isKeyFrame, frameData, startIndex, length)));
 }