public int GetIntFromStream(Stream stream) { Interlocked.Increment(ref s_getIntFromStreamCallbacks); // we don't know the stream size // If we care much about the buffer size it should go to IDuplexStreamingTestParams return(VerifiableStream.VerifyStream(stream, -1, 4096, _verifyContent)); }
private void TestGetStreamFromInt(StreamingService channel, int requestedStreamSize, int bufSize) { using (var stream = channel.GetStreamFromInt(requestedStreamSize)) { var receivedStreamSize = VerifiableStream.VerifyStream(stream, requestedStreamSize, bufSize, _params.VerifyStreamContent); if (receivedStreamSize != requestedStreamSize) { VerifiableStream.ReportIncorrectStreamSize(receivedStreamSize, requestedStreamSize); } } }
private async Task TestGetStreamFromIntAsync(StreamingService channel, int requestedStreamSize, int bufSize) { using (var stream = await channel.GetStreamFromIntAsync(requestedStreamSize)) { var receivedStreamSize = VerifiableStream.VerifyStream(stream, requestedStreamSize, bufSize); if (receivedStreamSize != requestedStreamSize) { VerifiableStream.ReportIncorrectStreamSize(receivedStreamSize, requestedStreamSize); } } }
private static int TestGetStreamFromInt(StreamingRequestContext <StreamingService> details) { details.TestScenario = StreamingScenarios.StreamIn; bool verifyStreamContent = details.VerifyStreamContent; using (var stream = details.Channel.GetStreamFromInt(details.StreamSize)) { var receivedStreamSize = VerifiableStream.VerifyStream(stream, details.StreamSize, details.BufferSize, verifyStreamContent); if (receivedStreamSize != details.StreamSize) { VerifiableStream.ReportIncorrectStreamSize(receivedStreamSize, details.StreamSize); } } return(1); }
private void TestEchoStream(StreamingService channel, int requestedStreamSize, int bufSize) { using (var stream = new VerifiableStream(requestedStreamSize)) { using (var receivedStream = channel.EchoStream(stream)) { var receivedSize = VerifiableStream.VerifyStream(receivedStream, requestedStreamSize, bufSize); if (receivedSize != requestedStreamSize) { VerifiableStream.ReportIncorrectStreamSize(receivedSize, requestedStreamSize); } } } }
private static int TestEchoStream(StreamingRequestContext <StreamingService> details) { details.TestScenario = StreamingScenarios.StreamEcho; using (var stream = new VerifiableStream(details.StreamSize)) { using (var receivedStream = details.Channel.EchoStream(stream)) { var receivedSize = VerifiableStream.VerifyStream(receivedStream, details.StreamSize, details.BufferSize, details.VerifyStreamContent); if (receivedSize != details.StreamSize) { VerifiableStream.ReportIncorrectStreamSize(receivedSize, details.StreamSize); } } } return(1); }
public int GetIntFromStream(Stream stream) { // we don't know the stream size // If we care much about the buffer size it should go to IDuplexStreamingTestParams return(VerifiableStream.VerifyStream(stream, -1, 4096)); }