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