Skip to content

Commit 30dda1d

Browse files
CopilotJamesNK
andcommitted
Complete implementation: update API file and make constructor public
Co-authored-by: JamesNK <[email protected]>
1 parent 65e3581 commit 30dda1d

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

src/Aspire.Hosting/IInteractionService.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ public sealed class InteractionInputCollection : IReadOnlyList<InteractionInput>
180180
private readonly IReadOnlyList<InteractionInput> _inputs;
181181
private readonly IReadOnlyDictionary<string, InteractionInput> _inputsByName;
182182

183-
internal InteractionInputCollection(IReadOnlyList<InteractionInput> inputs)
183+
/// <summary>
184+
/// Initializes a new instance of the <see cref="InteractionInputCollection"/> class.
185+
/// </summary>
186+
/// <param name="inputs">The collection of interaction inputs to wrap.</param>
187+
public InteractionInputCollection(IReadOnlyList<InteractionInput> inputs)
184188
{
185189
// Create a new list with proper names assigned
186190
var processedInputs = new List<InteractionInput>();

src/Aspire.Hosting/api/Aspire.Hosting.cs

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ public partial interface IInteractionService
349349
System.Threading.Tasks.Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, System.Threading.CancellationToken cancellationToken = default);
350350
System.Threading.Tasks.Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, System.Threading.CancellationToken cancellationToken = default);
351351
System.Threading.Tasks.Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, System.Threading.CancellationToken cancellationToken = default);
352-
System.Threading.Tasks.Task<InteractionResult<System.Collections.Generic.IReadOnlyList<InteractionInput>>> PromptInputsAsync(string title, string? message, System.Collections.Generic.IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, System.Threading.CancellationToken cancellationToken = default);
352+
System.Threading.Tasks.Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, System.Collections.Generic.IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, System.Threading.CancellationToken cancellationToken = default);
353353
System.Threading.Tasks.Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, System.Threading.CancellationToken cancellationToken = default);
354354
System.Threading.Tasks.Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, System.Threading.CancellationToken cancellationToken = default);
355355
}
@@ -364,7 +364,7 @@ public sealed partial class InputsDialogValidationContext
364364
{
365365
public required System.Threading.CancellationToken CancellationToken { get { throw null; } init { } }
366366

367-
public required System.Collections.Generic.IReadOnlyList<InteractionInput> Inputs { get { throw null; } init { } }
367+
public required InteractionInputCollection Inputs { get { throw null; } init { } }
368368

369369
public required System.IServiceProvider ServiceProvider { get { throw null; } init { } }
370370

@@ -381,6 +381,28 @@ public enum InputType
381381
Number = 4
382382
}
383383

384+
[System.Diagnostics.CodeAnalysis.Experimental("ASPIREINTERACTION001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
385+
public sealed partial class InteractionInputCollection : System.Collections.Generic.IReadOnlyList<InteractionInput>, System.Collections.Generic.IEnumerable<InteractionInput>, System.Collections.IEnumerable
386+
{
387+
public InteractionInputCollection(System.Collections.Generic.IReadOnlyList<InteractionInput> inputs) { }
388+
389+
public int Count { get { throw null; } }
390+
391+
public System.Collections.Generic.IEnumerable<string> Names { get { throw null; } }
392+
393+
public InteractionInput this[int index] { get { throw null; } }
394+
395+
public InteractionInput this[string name] { get { throw null; } }
396+
397+
public bool ContainsName(string name) { throw null; }
398+
399+
public System.Collections.Generic.IEnumerator<InteractionInput> GetEnumerator() { throw null; }
400+
401+
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
402+
403+
public bool TryGetByName(string name, out InteractionInput? input) { throw null; }
404+
}
405+
384406
[System.Diagnostics.CodeAnalysis.Experimental("ASPIREINTERACTION001", UrlFormat = "https://aka.ms/aspire/diagnostics/{0}")]
385407
public sealed partial class InteractionInput
386408
{
@@ -394,6 +416,8 @@ public sealed partial class InteractionInput
394416

395417
public int? MaxLength { get { throw null; } set { } }
396418

419+
public string? Name { get { throw null; } init { } }
420+
397421
public System.Collections.Generic.IReadOnlyList<System.Collections.Generic.KeyValuePair<string, string>>? Options { get { throw null; } init { } }
398422

399423
public string? Placeholder { get { throw null; } set { } }

0 commit comments

Comments
 (0)