7 instantiations of ResourceLogLine
aspire (1)
BackchannelJsonSerializerContext.ResourceLogLine.g.cs (1)
32ObjectWithParameterizedConstructorCreator = static args => new global::Aspire.Cli.Backchannel.ResourceLogLine(){ ResourceName = (string)args[0], LineNumber = (int)args[1], Content = (string)args[2], IsError = (bool)args[3] },
Aspire.Cli.Tests (6)
Mcp\ListConsoleLogsToolTests.cs (6)
87new ResourceLogLine { ResourceName = "api-service", LineNumber = 1, Content = "Starting application...", IsError = false }, 88new ResourceLogLine { ResourceName = "api-service", LineNumber = 2, Content = "Application started", IsError = false }, 89new ResourceLogLine { ResourceName = "other-service", LineNumber = 1, Content = "Different service log", IsError = false } 123new ResourceLogLine { ResourceName = "api-service", LineNumber = 1, Content = "Test log line", IsError = false } 153new ResourceLogLine { ResourceName = "api-service", LineNumber = 1, Content = "2024-01-15T10:30:00.123Z Log message after timestamp", IsError = false } 182new ResourceLogLine { ResourceName = "api-service", LineNumber = 1, Content = "\u001b[32mGreen text\u001b[0m normal text", IsError = false }
118 references to ResourceLogLine
aspire (115)
Backchannel\AppHostAuxiliaryBackchannel.cs (9)
340public async IAsyncEnumerable<ResourceLogLine> GetResourceLogsAsync( 349IAsyncEnumerable<ResourceLogLine>? logLines; 352logLines = await rpc.InvokeWithCancellationAsync<IAsyncEnumerable<ResourceLogLine>>( 373await foreach (var logLine in logLines.WithCancellation(cancellationToken).ConfigureAwait(false)) 578public IAsyncEnumerable<ResourceLogLine> GetConsoleLogsV2Async( 593private async IAsyncEnumerable<ResourceLogLine> GetConsoleLogsV2InternalAsync( 601IAsyncEnumerable<ResourceLogLine>? logLines; 604logLines = await rpc.InvokeWithCancellationAsync<IAsyncEnumerable<ResourceLogLine>>( 619await foreach (var logLine in logLines.WithCancellation(cancellationToken).ConfigureAwait(false))
Backchannel\BackchannelJsonSerializerContext.cs (4)
51[JsonSerializable(typeof(ResourceLogLine))] 52[JsonSerializable(typeof(ResourceLogLine[]))] 53[JsonSerializable(typeof(IAsyncEnumerable<ResourceLogLine>))] 54[JsonSerializable(typeof(MessageFormatterEnumerableTracker.EnumeratorResults<ResourceLogLine>))]
Backchannel\IAppHostAuxiliaryBackchannel.cs (1)
77IAsyncEnumerable<ResourceLogLine> GetResourceLogsAsync(
BackchannelJsonSerializerContext.EnumeratorResultsResourceLogLine.g.cs (25)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>>? _EnumeratorResultsResourceLogLine; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>> EnumeratorResultsResourceLogLine 22get => _EnumeratorResultsResourceLogLine ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>>)Options.GetTypeInfo(typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>> Create_EnumeratorResultsResourceLogLine(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>> jsonTypeInfo)) 29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>> 32ObjectWithParameterizedConstructorCreator = static args => new global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>(){ Values = (global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>)args[0], Finished = (bool)args[1] }, 35ConstructorAttributeProviderFactory = static () => typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null), 39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>>(options, objectInfo); 51var info0 = new global::System.Text.Json.Serialization.Metadata.JsonPropertyInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>> 56DeclaringType = typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>), 58Getter = static obj => ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>)obj).Values, 66AttributeProviderFactory = static () => typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>).GetProperty("Values", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>), global::System.Array.Empty<global::System.Type>(), null), 69properties[0] = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreatePropertyInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>>(options, info0); 76DeclaringType = typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>), 78Getter = static obj => ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>)obj).Finished, 86AttributeProviderFactory = static () => typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>).GetProperty("Finished", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null), 97private void EnumeratorResultsResourceLogLineSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>? value) 108IReadOnlyListResourceLogLineSerializeHandler(writer, ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>)value).Values); 109writer.WriteBoolean(PropName_finished, ((global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>)value).Finished); 119ParameterType = typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>),
BackchannelJsonSerializerContext.GetJsonTypeInfo.g.cs (5)
138if (type == typeof(global::Aspire.Cli.Backchannel.ResourceLogLine)) 142if (type == typeof(global::Aspire.Cli.Backchannel.ResourceLogLine[])) 322if (type == typeof(global::StreamJsonRpc.Reflection.MessageFormatterEnumerableTracker.EnumeratorResults<global::Aspire.Cli.Backchannel.ResourceLogLine>)) 358if (type == typeof(global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceLogLine>)) 398if (type == typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>))
BackchannelJsonSerializerContext.IAsyncEnumerableResourceLogLine.g.cs (10)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceLogLine>>? _IAsyncEnumerableResourceLogLine; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceLogLine>> IAsyncEnumerableResourceLogLine 22get => _IAsyncEnumerableResourceLogLine ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceLogLine>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceLogLine>)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceLogLine>> Create_IAsyncEnumerableResourceLogLine(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceLogLine>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceLogLine>> jsonTypeInfo)) 29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceLogLine>> 35jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateIAsyncEnumerableInfo<global::System.Collections.Generic.IAsyncEnumerable<global::Aspire.Cli.Backchannel.ResourceLogLine>, global::Aspire.Cli.Backchannel.ResourceLogLine>(options, info);
BackchannelJsonSerializerContext.IReadOnlyListResourceLogLine.g.cs (12)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>>? _IReadOnlyListResourceLogLine; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>> IReadOnlyListResourceLogLine 22get => _IReadOnlyListResourceLogLine ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>>)Options.GetTypeInfo(typeof(global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>> Create_IReadOnlyListResourceLogLine(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>> jsonTypeInfo)) 29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>> 35jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateIEnumerableInfo<global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>, global::Aspire.Cli.Backchannel.ResourceLogLine>(options, info); 45private void IReadOnlyListResourceLogLineSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::System.Collections.Generic.IReadOnlyList<global::Aspire.Cli.Backchannel.ResourceLogLine>? value) 55foreach (global::Aspire.Cli.Backchannel.ResourceLogLine element in value)
BackchannelJsonSerializerContext.ResourceLogLine.g.cs (27)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceLogLine>? _ResourceLogLine; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceLogLine> ResourceLogLine 22get => _ResourceLogLine ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceLogLine>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Backchannel.ResourceLogLine)); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceLogLine> Create_ResourceLogLine(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Backchannel.ResourceLogLine>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceLogLine> jsonTypeInfo)) 29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Aspire.Cli.Backchannel.ResourceLogLine> 35ConstructorAttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceLogLine).GetConstructor(InstanceMemberBindingFlags, binder: null, global::System.Array.Empty<global::System.Type>(), modifiers: null), 39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Aspire.Cli.Backchannel.ResourceLogLine>(options, objectInfo); 56DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceLogLine), 58Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceLogLine)obj).ResourceName, 66AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceLogLine).GetProperty("ResourceName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 79DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceLogLine), 81Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceLogLine)obj).LineNumber, 89AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceLogLine).GetProperty("LineNumber", InstanceMemberBindingFlags, null, typeof(int), global::System.Array.Empty<global::System.Type>(), null), 100DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceLogLine), 102Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceLogLine)obj).Content, 110AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceLogLine).GetProperty("Content", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null), 123DeclaringType = typeof(global::Aspire.Cli.Backchannel.ResourceLogLine), 125Getter = static obj => ((global::Aspire.Cli.Backchannel.ResourceLogLine)obj).IsError, 133AttributeProviderFactory = static () => typeof(global::Aspire.Cli.Backchannel.ResourceLogLine).GetProperty("IsError", InstanceMemberBindingFlags, null, typeof(bool), global::System.Array.Empty<global::System.Type>(), null), 143private void ResourceLogLineSerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Backchannel.ResourceLogLine? value) 153writer.WriteString(PropName_ResourceName, ((global::Aspire.Cli.Backchannel.ResourceLogLine)value).ResourceName); 154writer.WriteNumber(PropName_LineNumber, ((global::Aspire.Cli.Backchannel.ResourceLogLine)value).LineNumber); 155writer.WriteString(PropName_Content, ((global::Aspire.Cli.Backchannel.ResourceLogLine)value).Content); 156writer.WriteBoolean(PropName_IsError, ((global::Aspire.Cli.Backchannel.ResourceLogLine)value).IsError);
BackchannelJsonSerializerContext.ResourceLogLineArray.g.cs (10)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceLogLine[]>? _ResourceLogLineArray; 19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceLogLine[]> ResourceLogLineArray 22get => _ResourceLogLineArray ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceLogLine[]>)Options.GetTypeInfo(typeof(global::Aspire.Cli.Backchannel.ResourceLogLine[])); 25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceLogLine[]> Create_ResourceLogLineArray(global::System.Text.Json.JsonSerializerOptions options) 27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Aspire.Cli.Backchannel.ResourceLogLine[]>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Aspire.Cli.Backchannel.ResourceLogLine[]> jsonTypeInfo)) 29var info = new global::System.Text.Json.Serialization.Metadata.JsonCollectionInfoValues<global::Aspire.Cli.Backchannel.ResourceLogLine[]> 35jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateArrayInfo<global::Aspire.Cli.Backchannel.ResourceLogLine>(options, info); 45private void ResourceLogLineArraySerializeHandler(global::System.Text.Json.Utf8JsonWriter writer, global::Aspire.Cli.Backchannel.ResourceLogLine[]? value)
Commands\LogsCommand.cs (11)
192List<ResourceLogLine> logLines; 227foreach (var logLine in logLines) 253foreach (var logLine in tailedLogs) 260await foreach (var logLine in connection.GetResourceLogsAsync(resourceName, follow: true, cancellationToken).ConfigureAwait(false)) 271private async Task<List<ResourceLogLine>> CollectLogsAsync( 276var logLines = new List<ResourceLogLine>(); 277await foreach (var logLine in GetLogsAsync(connection, resourceName, cancellationToken).ConfigureAwait(false)) 287private async IAsyncEnumerable<ResourceLogLine> GetLogsAsync( 294await foreach (var logLine in connection.GetResourceLogsAsync(resourceName, follow: false, cancellationToken).ConfigureAwait(false)) 311await foreach (var logLine in connection.GetResourceLogsAsync(snapshot.Name, follow: false, cancellationToken).ConfigureAwait(false)) 318private void OutputLogLine(ResourceLogLine logLine, OutputFormat format)
Mcp\Tools\ListConsoleLogsTool.cs (1)
68await foreach (var logLine in connection.GetResourceLogsAsync(resourceName, follow: false, cancellationToken).ConfigureAwait(false))
Aspire.Cli.Tests (3)
TestServices\TestAppHostAuxiliaryBackchannel.cs (3)
37public List<ResourceLogLine> LogLines { get; set; } = []; 68public async IAsyncEnumerable<ResourceLogLine> GetResourceLogsAsync( 77foreach (var line in lines)