5 overrides of TryWrite
System.Threading.Channels (5)
168 references to TryWrite
aspire (17)
Interaction\ExtensionInteractionService.cs (17)
65var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.ShowStatusAsync(statusText.RemoveSpectreFormatting(), _cancellationToken));
69result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.ShowStatusAsync(null, _cancellationToken));
76var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.ShowStatusAsync(statusText.RemoveSpectreFormatting(), _cancellationToken));
79result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.ShowStatusAsync(null, _cancellationToken));
169var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.DisplayIncompatibleVersionErrorAsync(ex.RequiredCapability, appHostHostingSdkVersion, _cancellationToken));
176var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.DisplayErrorAsync(errorMessage.RemoveSpectreFormatting(), _cancellationToken));
183var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.DisplayMessageAsync(emoji, message.RemoveSpectreFormatting(), _cancellationToken));
190var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.DisplaySuccessAsync(message.RemoveSpectreFormatting(), _cancellationToken));
197var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.DisplaySubtleMessageAsync(message.RemoveSpectreFormatting(), _cancellationToken));
204var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.DisplayDashboardUrlsAsync(dashboardUrls, _cancellationToken));
210var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.DisplayLinesAsync(lines.Select(line => new DisplayLineState(line.Stream.RemoveSpectreFormatting(), line.Line.RemoveSpectreFormatting())), _cancellationToken));
217var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.DisplayCancellationMessageAsync(_cancellationToken));
223var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.DisplayEmptyLineAsync(_cancellationToken));
230var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.OpenProjectAsync(projectPath, _cancellationToken));
243var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.LogMessageAsync(LogLevel.Information, markdown, _cancellationToken));
255var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.LogMessageAsync(logLevel, message.RemoveSpectreFormatting(), _cancellationToken));
271var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.NotifyAppHostStartupCompletedAsync(_cancellationToken));
Aspire.Cli.Tests (8)
Aspire.Components.Common.TestUtilities (1)
Aspire.Confluent.Kafka (2)
Aspire.Confluent.Kafka.Tests (2)
Aspire.Dashboard (4)
Aspire.Dashboard.Components.Tests (17)
Pages\ConsoleLogsTests.cs (14)
54subscribedResourceNamesChannel.Writer.TryWrite(name);
105subscribedResourceNamesChannel.Writer.TryWrite(name);
137consoleLogsChannel.Writer.TryWrite([new ResourceLogLine(1, "Test content", IsErrorMessage: false)]);
327consoleLogsChannel.Writer.TryWrite([new ResourceLogLine(1, "Hello world", IsErrorMessage: false)]);
468consoleLogsChannel.Writer.TryWrite([new ResourceLogLine(1, "2025-02-08T10:16:08Z Hello world", IsErrorMessage: false)]);
484consoleLogsChannel.Writer.TryWrite([new ResourceLogLine(2, "2025-03-08T10:16:08Z Hello world", IsErrorMessage: false)]);
528consoleLogsChannel.Writer.TryWrite([new ResourceLogLine(1, "2025-02-08T10:16:08Z Hello world", IsErrorMessage: false)]);
540consoleLogsChannel.Writer.TryWrite([new ResourceLogLine(2, "2025-03-08T10:16:08Z Hello world", IsErrorMessage: false)]);
596resourceChannel.Writer.TryWrite([
663resourceCommandChannel.Writer.TryWrite(new ResourceCommandResponseViewModel
722consoleLogsChannel.Writer.TryWrite([new ResourceLogLine(1, pauseContent, IsErrorMessage: false)]);
723consoleLogsChannel.Writer.TryWrite([new ResourceLogLine(2, pauseContent, IsErrorMessage: false)]);
724consoleLogsChannel.Writer.TryWrite([new ResourceLogLine(3, pauseContent, IsErrorMessage: false)]);
766consoleLogsChannel.Writer.TryWrite([new ResourceLogLine(4, resumeContent, IsErrorMessage: false)]);
Aspire.Dashboard.Tests (11)
ChannelExtensionsTests.cs (8)
21channel.Writer.TryWrite(["a", "b", "c"]);
45channel.Writer.TryWrite(["a", "b", "c"]);
71channel.Writer.TryWrite(["a", "b", "c"]);
80resultChannel.Writer.TryWrite(batch);
94channel.Writer.TryWrite(["d", "e", "f"]);
115channel.Writer.TryWrite(["a", "b", "c"]);
124resultChannel.Writer.TryWrite(batch);
138channel.Writer.TryWrite(["d", "e", "f"]);
Aspire.Hosting (9)
Aspire.Hosting.Azure.Tests (2)
Aspire.Hosting.Tests (12)
GenerateDocumentationAndConfigFiles (2)
InMemory.FunctionalTests (5)
Metrics (2)
Metrics.Legacy (2)
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (1)
Microsoft.AspNetCore.Hosting.Tests (1)
Microsoft.AspNetCore.Http.Connections.Tests (1)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (4)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Microsoft.AspNetCore.SignalR.Client.Core (3)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (8)
Microsoft.AspNetCore.SignalR.Core (3)
Microsoft.AspNetCore.SignalR.Tests (8)
Microsoft.CodeAnalysis.Analyzers (2)
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
Microsoft.CodeAnalysis.CodeStyle (2)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
Microsoft.CodeAnalysis.Threading.Package (2)
Microsoft.CodeAnalysis.Workspaces (2)
Microsoft.Extensions.ServiceDiscovery.Tests (1)
Microsoft.ML.Data (1)
Microsoft.ML.Sweeper (1)
Roslyn.Diagnostics.Analyzers (2)
SignalR.Client.FunctionalTestApp (3)
SignalRSamples (1)
Stress.ApiService (1)
System.Net.Http (1)
System.Net.Quic (4)
System.Threading.Channels (2)
Test.Utilities (2)
TestDiscoveryWorker (1)
Text.Analyzers (2)