4 overrides of TryComplete
System.Threading.Channels (4)
System\Threading\Channels\BoundedChannel.cs (1)
311public override bool TryComplete(Exception? error)
System\Threading\Channels\SingleConsumerUnboundedChannel.cs (1)
209public override bool TryComplete(Exception? error)
System\Threading\Channels\UnboundedChannel.cs (1)
201public override bool TryComplete(Exception? error)
System\Threading\Channels\UnboundedPriorityChannel.cs (1)
206public override bool TryComplete(Exception? error)
67 references to TryComplete
Aspire.Components.Common.Tests (1)
ActivityNotifier.cs (1)
51_activityChannel.Writer.TryComplete();
Aspire.Dashboard (1)
ResourceService\DashboardClient.cs (1)
508channel.Writer.TryComplete();
Aspire.Hosting (6)
ApplicationModel\ResourceLoggerService.cs (2)
367using var _ = _logStreamCts.Token.Register(() => channel.Writer.TryComplete()); 408channel.Writer.TryComplete();
ApplicationModel\ResourceNotificationService.cs (1)
334channel.Writer.TryComplete();
Dcp\ResourceLogSource.cs (3)
62channel.Writer.TryComplete(); 89channel.Writer.TryComplete(); 101channel.Writer.TryComplete(ex);
ClientSample (2)
UploadSample.cs (2)
52channel.Writer.TryComplete(); 79source.TryComplete();
InMemory.FunctionalTests (3)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
1047ToServerAcceptQueue.Writer.TryComplete(); 1048ToClientAcceptQueue.Writer.TryComplete();
TestTransport\InMemoryTransportFactory.cs (1)
52_acceptQueue.Writer.TryComplete();
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (1)
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
65item.Value.Writer.TryComplete();
Microsoft.AspNetCore.Hosting.Tests (1)
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
65item.Value.Writer.TryComplete();
Microsoft.AspNetCore.Http.Connections.Tests (6)
TestWebSocketConnectionFeature.cs (6)
85_output.TryComplete(new OperationCanceledException()); 91_output.TryComplete(new WebSocketException(WebSocketError.ConnectionClosedPrematurely)); 106_output.TryComplete(); 121_output.TryComplete(); 127_output.TryComplete(); 183_output.TryComplete();
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http2\Http2FrameWriter.cs (1)
453_channel.Writer.TryComplete();
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
1047ToServerAcceptQueue.Writer.TryComplete(); 1048ToClientAcceptQueue.Writer.TryComplete();
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (2)
Internal\NamedPipeConnectionListener.cs (2)
89_acceptedQueue.Writer.TryComplete(); 93_acceptedQueue.Writer.TryComplete(ex);
Microsoft.AspNetCore.SignalR.Client.Core (7)
HubConnection.cs (1)
1701invocationMessageChannel.Writer.TryComplete();
HubConnectionExtensions.StreamAsChannelAsync.cs (2)
308outputChannel.Writer.TryComplete(ex); 313outputChannel.Writer.TryComplete();
Internal\InvocationRequest.cs (4)
103_channel.Writer.TryComplete(new InvalidOperationException("Server provided a result in a completion response to a streamed invocation.")); 118_channel.Writer.TryComplete(); 132_channel.Writer.TryComplete(exception); 163_channel.Writer.TryComplete(new OperationCanceledException());
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (3)
Hubs.cs (3)
237channel.Writer.TryComplete(); 267output.Writer.TryComplete(); 291output.Writer.TryComplete();
Microsoft.AspNetCore.SignalR.Client.Tests (2)
HubConnectionTests.cs (2)
456channel.Writer.TryComplete(); 528channel.Writer.TryComplete();
Microsoft.AspNetCore.SignalR.Core (1)
StreamTracker.cs (1)
139_channel.Writer.TryComplete(ex);
Microsoft.AspNetCore.SignalR.Tests (12)
HubConnectionHandlerTestUtils\Hubs.cs (10)
779channel.Writer.TryComplete(new Exception("Exception from channel")); 786channel.Writer.TryComplete(new ChannelClosedException("ChannelClosedException from channel")); 793channel.Writer.TryComplete(new ChannelClosedException(new Exception("ChannelClosedException from channel"))); 826output.Writer.TryComplete(); 1041channel.Writer.TryComplete(); 1056channel.Writer.TryComplete(); 1071channel.Writer.TryComplete(); 1085channel.Writer.TryComplete(); 1101channel.Writer.TryComplete(); 1142channel.Writer.TryComplete();
NativeAotTests.cs (2)
258output.Writer.TryComplete(); 292output.Writer.TryComplete();
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (2)
296() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken))); 332channel.Writer.TryComplete(exception);
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (2)
296() => channel.Writer.TryComplete(new OperationCanceledException(cancellationToken))); 332channel.Writer.TryComplete(exception);
Microsoft.Extensions.AI (1)
ChatCompletion\AnonymousDelegatingChatClient.cs (1)
154_ = updates.Writer.TryComplete(error);
SignalRSamples (4)
Hubs\Streaming.cs (1)
42channel.Writer.TryComplete();
ObservableExtensions.cs (3)
30error => channel.Writer.TryComplete(error), 31() => channel.Writer.TryComplete()); 32var abortRegistration = connectionAborted.Register(() => channel.Writer.TryComplete());
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
1848bool completed = _writeChannel.Writer.TryComplete();
System.Net.Quic (5)
System\Net\Quic\QuicConnection.cs (4)
662_acceptQueue.Writer.TryComplete(exception); 669_acceptQueue.Writer.TryComplete(exception); 679_acceptQueue.Writer.TryComplete(exception); 863_acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(GetType().FullName)));
System\Net\Quic\QuicListener.cs (1)
433_acceptQueue.Writer.TryComplete(ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(GetType().FullName)));
System.Threading.Channels (1)
System\Threading\Channels\ChannelWriter.cs (1)
72if (!TryComplete(error))