File: Ats\ICodeGenerator.cs
Web Access
Project: src\src\Aspire.Hosting\Aspire.Hosting.csproj (Aspire.Hosting)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
 
using System.Diagnostics.CodeAnalysis;
 
namespace Aspire.Hosting.Ats;
 
/// <summary>
/// Interface for generating language-specific code from ATS capabilities.
/// </summary>
[Experimental("ASPIREATS001")]
public interface ICodeGenerator
{
    /// <summary>
    /// Gets the target language name (e.g., "TypeScript", "Python").
    /// </summary>
    string Language { get; }
 
    /// <summary>
    /// Generates the distributed application SDK code from the ATS context.
    /// </summary>
    /// <param name="context">The ATS context containing capabilities, types, and enums.</param>
    /// <returns>A dictionary of file paths to file contents.</returns>
    Dictionary<string, string> GenerateDistributedApplication(AtsContext context);
}