Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/ModularPipelines.Azure/Extensions/AzureExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@

namespace ModularPipelines.Azure.Extensions;

/// <summary>
/// Extension methods for Azure integration with ModularPipelines.
/// </summary>
/// <remarks>
/// Use <c>context.Azure()</c> to access Azure CLI commands from pipeline modules.
/// </remarks>
public static class AzureExtensions
{
#pragma warning disable CA2255
Expand All @@ -28,6 +34,11 @@ public static void RegisterAzureContext()
ModularPipelinesContextRegistry.RegisterContext(collection => RegisterAzureContext(collection));
}

/// <summary>
/// Registers Azure services with the dependency injection container.
/// </summary>
/// <param name="services">The service collection to register services with.</param>
/// <returns>The service collection for method chaining.</returns>
public static IServiceCollection RegisterAzureContext(this IServiceCollection services)
{
services.TryAddScoped<IAzure, Azure>();
Expand Down
9 changes: 8 additions & 1 deletion src/ModularPipelines/Context/ICommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@

namespace ModularPipelines.Context;

/// <summary>
/// Provides functionality for executing command line tools and processes.
/// </summary>
/// <remarks>
/// This interface is the core abstraction for running external processes.
/// For shell-specific execution, see <see cref="IBash"/> and <see cref="IPowershell"/>.
/// </remarks>
public interface ICommand
{
/// <summary>
Expand All @@ -12,4 +19,4 @@ public interface ICommand
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
Task<CommandResult> ExecuteCommandLineTool(CommandLineToolOptions options, CancellationToken cancellationToken = default);
}
}
Loading