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
26 changes: 13 additions & 13 deletions src/ModularPipelines/Context/IDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ namespace ModularPipelines.Context;
public interface IDownloader
{
/// <summary>
/// Used to download a file from the web and save to the local machine.
/// Downloads a file from the web and saves it to the local machine.
/// </summary>
/// <param name="options"></param>
/// <param name="cancellationToken"></param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
/// <param name="options">The download options including the source URL and destination path.</param>
/// <param name="cancellationToken">A token to cancel the download operation.</param>
/// <returns>The downloaded file.</returns>
public Task<File> DownloadFileAsync(DownloadFileOptions options, CancellationToken cancellationToken = default);

/// <summary>
/// Used to download a string from the web.
/// Downloads content from the web as a string.
/// </summary>
/// <param name="options"></param>
/// <param name="cancellationToken"></param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
/// <param name="options">The download options including the source URL.</param>
/// <param name="cancellationToken">A token to cancel the download operation.</param>
/// <returns>The downloaded content as a string, or null if the download failed.</returns>
public Task<string?> DownloadStringAsync(DownloadOptions options, CancellationToken cancellationToken = default);

/// <summary>
/// Used to get a response from the web.
/// Gets an HTTP response from the web.
/// </summary>
/// <param name="options"></param>
/// <param name="cancellationToken"></param>
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
/// <param name="options">The download options including the source URL.</param>
/// <param name="cancellationToken">A token to cancel the download operation.</param>
/// <returns>The HTTP response message.</returns>
public Task<HttpResponseMessage> DownloadResponseAsync(DownloadOptions options, CancellationToken cancellationToken = default);
}
}
3 changes: 3 additions & 0 deletions src/ModularPipelines/Context/IEnvironmentContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public interface IEnvironmentContext
/// </summary>
public OperatingSystemIdentifier OperatingSystem { get; }

/// <summary>
/// Gets the version of the current operating system.
/// </summary>
public Version OperatingSystemVersion { get; }

/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion src/ModularPipelines/IBuildSystemDetector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public interface IBuildSystemDetector
/// <summary>
/// Gets a value indicating whether the current build agent is the type specified.
/// </summary>
/// <returns>True if it is the current build agent type.</returns>
/// <param name="buildSystem">The build system type to check for.</param>
/// <returns>True if the pipeline is running on the specified build system; otherwise, false.</returns>
bool Is(BuildSystem buildSystem) => GetCurrentBuildSystem() == buildSystem;
}
Loading