4 overrides of TryWrite
System.Threading.Channels (4)
System\Threading\Channels\BoundedChannel.cs (1)
354public override bool TryWrite(T item)
System\Threading\Channels\SingleConsumerUnboundedChannel.cs (1)
281public override bool TryWrite(T item)
System\Threading\Channels\UnboundedChannel.cs (1)
241public override bool TryWrite(T item)
System\Threading\Channels\UnboundedPriorityChannel.cs (1)
246public override bool TryWrite(T item)
70 references to TryWrite
Aspire.Components.Common.Tests (1)
ActivityNotifier.cs (1)
36_activityChannel.Writer.TryWrite(data);
Aspire.Confluent.Kafka (2)
AspireKafkaConsumerExtensions.cs (1)
196channel.Writer.TryWrite(json);
AspireKafkaProducerExtensions.cs (1)
196channel.Writer.TryWrite(json);
Aspire.Confluent.Kafka.Tests (2)
MetricsTests.cs (2)
61writer.TryWrite(statistic); 178writer.TryWrite(statistic);
Aspire.Dashboard (1)
ResourceService\DashboardClient.cs (1)
503channel.Writer.TryWrite(logLines);
Aspire.Dashboard.Tests (1)
TelemetryRepositoryTests\LogTests.cs (1)
725resultChannel.Writer.TryWrite(callCount);
Aspire.Hosting (4)
ApplicationModel\ResourceLoggerService.cs (3)
175channel.Writer.TryWrite(logLines); 229channel.Writer.TryWrite(new(name, hasSubscribers)); 370void Log(LogEntry log) => channel.Writer.TryWrite(log);
ApplicationModel\ResourceNotificationService.cs (1)
313channel.Writer.TryWrite(resourceEvent);
Aspire.Hosting.Tests (5)
Dashboard\DashboardLifecycleHookTests.cs (1)
39testSink.MessageLogged += c => logChannel.Writer.TryWrite(c);
Dcp\ApplicationExecutorTests.cs (1)
449if (!logStreamPipesChannel.Writer.TryWrite((logStreamType, s)))
Dcp\TestKubernetesService.cs (1)
86c.Writer.TryWrite((WatchEventType.Modified, resource));
Utils\Grpc\TestAsyncStreamReader.cs (1)
24if (!_channel.Writer.TryWrite(message))
Utils\Grpc\TestServerStreamWriter.cs (1)
52if (!_channel.Writer.TryWrite(message))
InMemory.FunctionalTests (5)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (4)
297var success = _http3TestBase._serverReceivedSettings.Writer.TryWrite( 411MultiplexedConnectionContext.ToServerAcceptQueue.Writer.TryWrite(stream.StreamContext); 435MultiplexedConnectionContext.ToServerAcceptQueue.Writer.TryWrite(stream.StreamContext); 453MultiplexedConnectionContext.ToServerAcceptQueue.Writer.TryWrite(stream.StreamContext);
TestTransport\InMemoryTransportFactory.cs (1)
21_acceptQueue.Writer.TryWrite(connection);
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (1)
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
56writer.TryWrite(value);
Microsoft.AspNetCore.Hosting.Tests (1)
src\Shared\EventSource.Testing\TestCounterListener.cs (1)
56writer.TryWrite(value);
Microsoft.AspNetCore.Http.Connections.Tests (1)
TestWebSocketConnectionFeature.cs (1)
257if (_output.TryWrite(webSocketMessage))
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Http2\Http2FrameWriter.cs (1)
166if (!_channel.Writer.TryWrite(producer))
Internal\WebTransport\WebTransportSession.cs (1)
155if (!addedToOpenStreams || !_pendingStreams.Writer.TryWrite(stream))
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (4)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (4)
297var success = _http3TestBase._serverReceivedSettings.Writer.TryWrite( 411MultiplexedConnectionContext.ToServerAcceptQueue.Writer.TryWrite(stream.StreamContext); 435MultiplexedConnectionContext.ToServerAcceptQueue.Writer.TryWrite(stream.StreamContext); 453MultiplexedConnectionContext.ToServerAcceptQueue.Writer.TryWrite(stream.StreamContext);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Internal\NamedPipeConnectionListener.cs (1)
119while (!_acceptedQueue.Writer.TryWrite(connection))
Microsoft.AspNetCore.SignalR.Client.Core (3)
HubConnectionExtensions.StreamAsChannelAsync.cs (1)
295while (!outputChannel.Writer.TryWrite((TResult)item!))
Internal\InvocationRequest.cs (1)
139while (!_channel.Writer.TryWrite(item))
src\SignalR\common\Shared\MessageBuffer.cs (1)
206_waitForAck.Writer.TryWrite(newCount);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (8)
HubConnectionTests.cs (1)
2945_taskQueue.Writer.TryWrite((d, state));
HubConnectionTests.Tracing.cs (7)
48clientChannel.Writer.TryWrite(activity); 52serverChannel.Writer.TryWrite(activity); 247serverChannel.Writer.TryWrite(activity); 391serverChannel.Writer.TryWrite(activity); 494serverChannel.Writer.TryWrite(activity); 590serverChannel.Writer.TryWrite(activity); 680serverChannel.Writer.TryWrite(activity);
Microsoft.AspNetCore.SignalR.Core (3)
Internal\ChannelBasedSemaphore.cs (2)
20_channel.Writer.TryWrite(1); 37if (!_channel.Writer.TryWrite(1))
src\SignalR\common\Shared\MessageBuffer.cs (1)
206_waitForAck.Writer.TryWrite(newCount);
Microsoft.AspNetCore.SignalR.Tests (8)
HubConnectionHandlerTests.Activity.cs (8)
40ActivityStarted = a => serverChannel.Writer.TryWrite(a) 115ActivityStarted = a => serverChannel.Writer.TryWrite(a) 184ActivityStarted = a => serverChannel.Writer.TryWrite(a) 243ActivityStarted = a => serverChannel.Writer.TryWrite(a) 316ActivityStarted = a => serverChannel.Writer.TryWrite(a) 363ActivityStarted = a => serverChannel.Writer.TryWrite(a) 415ActivityStarted = a => serverChannel.Writer.TryWrite(a) 466ActivityStarted = a => serverChannel.Writer.TryWrite(a)
Microsoft.CodeAnalysis.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
322await produceItems(item => channel.Writer.TryWrite(item), args, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (1)
322await produceItems(item => channel.Writer.TryWrite(item), args, cancellationToken).ConfigureAwait(false);
Microsoft.ML.Data (1)
Transforms\RowShufflingTransformer.cs (1)
557bool retval = target.Writer.TryWrite(item);
Microsoft.ML.Sweeper (1)
AsyncSweeper.cs (1)
229_paramChannel.Writer.TryWrite(new ParameterSetWithId(_numGenerated++, paramSet));
SignalR.Client.FunctionalTestApp (3)
TestHub.cs (3)
63channel.Writer.TryWrite("a"); 64channel.Writer.TryWrite("b"); 65channel.Writer.TryWrite("c");
SignalRSamples (1)
ObservableExtensions.cs (1)
29value => channel.Writer.TryWrite(value),
Stress.ApiService (1)
Program.cs (1)
157channel.Writer.TryWrite($"Logged {logCount} messages.");
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
1176if (!_writeChannel.Writer.TryWrite(writeEntry))
System.Net.Quic (4)
System\Net\Quic\QuicConnection.cs (1)
705if (!_acceptQueue.Writer.TryWrite(stream))
System\Net\Quic\QuicListener.cs (3)
246if (!_acceptQueue.Writer.TryWrite(connection)) 278if (!_acceptQueue.Writer.TryWrite(ex)) 313if (!_acceptQueue.Writer.TryWrite(
System.Threading.Channels (2)
System\Threading\Channels\ChannelWriter.cs (2)
45TryWrite(item) ? default : 58if (TryWrite(innerItem))
TestDiscoveryWorker (1)
Program.cs (1)
148if (!_channel.Writer.TryWrite(fullName))