6 types derived from ChannelReader
Microsoft.AspNetCore.SignalR.Tests (1)
System.Threading.Channels (5)
288 references to ChannelReader
Aspire.Confluent.Kafka (1)
Aspire.Hosting (1)
Aspire.Hosting.Tests (24)
ClientSample (2)
GenerateDocumentationAndConfigFiles (4)
InMemory.FunctionalTests (2)
Metrics (4)
Metrics.Legacy (4)
Microsoft.AspNetCore.Http.Connections.Tests (2)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
Microsoft.AspNetCore.SignalR.Client.Core (42)
HubConnection.cs (8)
429/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
434public virtual async Task<ChannelReader<object?>> StreamAsChannelCoreAsync(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken = default)
682var reader = await StreamAsChannelCoreAsync(methodName, typeof(T), args, cts.Token).ConfigureAwait(false);
701private async Task<ChannelReader<object?>> StreamAsChannelCoreAsyncCore(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken)
740ChannelReader<object?> channel;
868throw new InvalidOperationException($"{reader.GetType()} is not a {typeof(ChannelReader<>).Name}.");
937private Task SendStreamItems<T>(ConnectionState connectionState, string streamId, ChannelReader<T> reader, CancellationTokenSource tokenSource)
1616async Task StartProcessingInvocationMessages(ChannelReader<InvocationMessage> invocationMessageChannelReader)
HubConnectionExtensions.StreamAsChannelAsync.cs (26)
27/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
30public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, CancellationToken cancellationToken = default)
45/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
48public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, CancellationToken cancellationToken = default)
64/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
67public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, CancellationToken cancellationToken = default)
84/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
87public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, CancellationToken cancellationToken = default)
105/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
108public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, CancellationToken cancellationToken = default)
127/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
130public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, CancellationToken cancellationToken = default)
150/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
153public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, CancellationToken cancellationToken = default)
174/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
177public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, CancellationToken cancellationToken = default)
199/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
202public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, CancellationToken cancellationToken = default)
225/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
228public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, object? arg9, CancellationToken cancellationToken = default)
252/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
255public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, object? arg9, object? arg10, CancellationToken cancellationToken = default)
270/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values.
272public static async Task<ChannelReader<TResult>> StreamAsChannelCoreAsync<TResult>(this HubConnection hubConnection, string methodName, object?[] args, CancellationToken cancellationToken = default)
276var inputChannel = await hubConnection.StreamAsChannelCoreAsync(methodName, typeof(TResult), args, cancellationToken).ConfigureAwait(false);
287private static async Task RunChannel<TResult>(ChannelReader<object?> inputChannel, Channel<TResult> outputChannel)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (39)
HubConnectionTests.cs (11)
769var channel = await connection.StreamAsChannelAsync<int>("Stream", 5).DefaultTimeout();
800var channel = await connection.StreamAsChannelAsync<string>("StreamEcho", channelWriter.Reader).DefaultTimeout();
848var channel = await connection.StreamAsChannelAsync<string>("StreamEcho", stream).DefaultTimeout();
896var channel = await connection.StreamAsChannelAsync<int>("StreamEchoInt", stream, cts.Token).DefaultTimeout();
979var channel = await connection.StreamAsChannelAsync<int>("Stream", 1000, cts.Token).DefaultTimeout();
1052var channel = await connection.StreamAsChannelAsync<int>("StreamException").DefaultTimeout();
1189var channel = await connection.StreamAsChannelAsync<int>("!@#$%");
1217var channel = await connection.StreamAsChannelAsync<int>("Stream", 42, 42);
1245var channel = await connection.StreamAsChannelAsync<int>("Stream", "xyz");
1272var channel = await connection.StreamAsChannelAsync<int>("HelloWorld").DefaultTimeout();
1326var channel = await connection.StreamAsChannelAsync<int>("StreamBroken").DefaultTimeout();
Microsoft.AspNetCore.SignalR.Client.Tests (30)
Microsoft.AspNetCore.SignalR.Core (7)
Microsoft.AspNetCore.SignalR.Microbenchmarks (7)
Microsoft.AspNetCore.SignalR.Tests (47)
HubConnectionHandlerTestUtils\Hubs.cs (39)
191public async Task<string> StreamingConcat(ChannelReader<string> source)
206public async Task StreamDontRead(ChannelReader<string> source)
213public async Task<int> StreamingSum(ChannelReader<int> source)
226public async Task<List<object>> UploadArray(ChannelReader<object> source)
242public async Task<List<object>> UploadArrayAuth(ChannelReader<object> source)
257public async Task<string> TestTypeCastingErrors(ChannelReader<int> source)
271public async Task<bool> TestCustomErrorPassing(ChannelReader<int> source)
285public Task UploadIgnoreItems(ChannelReader<string> source)
291public ChannelReader<string> StreamAndUploadIgnoreItems(ChannelReader<string> source)
298async Task ChannelFunc(ChannelWriter<string> output, ChannelReader<string> input)
306public async Task UploadDoesWorkOnComplete(ChannelReader<string> source)
362public async Task<int> GetClientResultWithStream(ChannelReader<int> channelReader)
702public ChannelReader<string> CounterChannel(int count)
718public async Task<ChannelReader<string>> CounterChannelAsync(int count)
725public async Task<ChannelReader<string>> CounterChannelAsync2(int count)
731public async ValueTask<ChannelReader<string>> CounterChannelValueTaskAsync(int count)
771public ChannelReader<string> BlockingStream()
776public ChannelReader<int> ExceptionStream()
783public ChannelReader<int> ChannelClosedExceptionStream()
790public ChannelReader<int> ChannelClosedExceptionInnerExceptionStream()
797public ChannelReader<int> ThrowStream()
802public ChannelReader<int> NullStream()
812public ChannelReader<string> StreamEcho(ChannelReader<string> source)
873private readonly ChannelReader<T> _inner;
875public AsyncEnumerableImplChannelThrows(ChannelReader<T> inner)
901private readonly ChannelReader<T> _channel;
907public ChannelAsyncEnumerator(ChannelReader<T> channel, CancellationToken cancellationToken)
1025public async Task<ChannelReader<string>> LongRunningStream()
1033public ChannelReader<int> CancelableStreamSingleParameter(CancellationToken token)
1048public ChannelReader<int> CancelableStreamMultiParameter(int ignore, int ignore2, CancellationToken token)
1063public ChannelReader<int> CancelableStreamNullableParameter(int x, string y, CancellationToken token)
1078public ChannelReader<int> StreamNullableParameter(int x, int? input)
1093public ChannelReader<int> CancelableStreamMiddleParameter(int ignore, CancellationToken token, int ignore2)
1129public ChannelReader<int> CountingCancelableStreamGeneratedChannel(int count, CancellationToken token)
1159public async Task Upload(ChannelReader<string> stream)
1375public async Task<int> ServicesAndParams(int value, [FromService] Service1 service, ChannelReader<int> channelReader, [FromService] Service2 service2, bool value2)
1405public async Task Stream(ChannelReader<int> channelReader)
Microsoft.AspNetCore.SignalR.Tests.Utils (2)
Microsoft.CodeAnalysis.Analyzers (4)
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
Microsoft.CodeAnalysis.CodeStyle (4)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (4)
Microsoft.CodeAnalysis.PublicApiAnalyzers (4)
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
Microsoft.CodeAnalysis.Threading.Package (4)
Microsoft.CodeAnalysis.Workspaces (4)
Roslyn.Diagnostics.Analyzers (4)
SignalR.Client.FunctionalTestApp (5)
SignalRSamples (9)
System.Threading.Channels (6)
Test.Utilities (4)
Text.Analyzers (4)