Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias examples for Http/DotNetBuild/MSTest #750 #798

Merged
merged 1 commit into from
Mar 28, 2016
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
22 changes: 22 additions & 0 deletions src/Cake.Common/Net/HttpAliases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ public static class HttpAliases
/// <summary>
/// Downloads the specified resource over HTTP to a temporary file.
/// </summary>
/// <example>
/// <code>
/// var resource = DownloadFile("http://www.example.org/index.html");
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="address">The URL of the resource to download.</param>
/// <returns>The path to the downloaded file.</returns>
Expand All @@ -29,6 +34,12 @@ public static FilePath DownloadFile(this ICakeContext context, string address)
/// <summary>
/// Downloads the specified resource over HTTP to a temporary file.
/// </summary>
/// <example>
/// <code>
/// var address = new Uri("http://www.example.org/index.html");
/// var resource = DownloadFile(address);
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="address">The URL of file to download.</param>
/// <returns>The path to the downloaded file.</returns>
Expand All @@ -49,6 +60,11 @@ public static FilePath DownloadFile(this ICakeContext context, Uri address)
/// <summary>
/// Downloads the specified resource over HTTP to the specified output path.
/// </summary>
/// <example>
/// <code>
/// DownloadFile("http://www.example.org/index.html", "./outputdir");
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="address">The URL of the resource to download.</param>
/// <param name="outputPath">The output path.</param>
Expand All @@ -62,6 +78,12 @@ public static void DownloadFile(this ICakeContext context, string address, FileP
/// <summary>
/// Downloads the specified resource over HTTP to the specified output path.
/// </summary>
/// <example>
/// <code>
/// var address = new Uri("http://www.example.org/index.html");
/// DownloadFile(address, "./outputdir");
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="address">The URL of the resource to download.</param>
/// <param name="outputPath">The output path.</param>
Expand Down
14 changes: 14 additions & 0 deletions src/Cake.Common/Tools/DotNetBuildAliases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ public static class DotNetBuildAliases
/// <summary>
/// Builds the specified solution using MSBuild or XBuild.
/// </summary>
/// <example>
/// <code>
/// DotNetBuild("./project/project.sln");
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="solution">The solution.</param>
[CakeMethodAlias]
Expand All @@ -27,6 +32,15 @@ public static void DotNetBuild(this ICakeContext context, FilePath solution)
/// <summary>
/// Builds the specified solution using MSBuild or XBuild.
/// </summary>
/// <example>
/// <code>
/// DotNetBuild("./project/project.sln", settings =>
/// settings.SetConfiguration("Debug")
/// .SetVerbosity(Core.Diagnostics.Verbosity.Minimal)
/// .WithTarget("Build")
/// .WithProperty("TreatWarningsAsErrors","true")
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="solution">The solution.</param>
/// <param name="configurator">The configurator.</param>
Expand Down
22 changes: 22 additions & 0 deletions src/Cake.Common/Tools/MSTest/MSTestAliases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public static class MSTestAliases
/// <summary>
/// Runs all MSTest unit tests in the assemblies matching the specified pattern.
/// </summary>
/// <example>
/// <code>
/// MSTest("./Tests/*.UnitTests.dll");
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="pattern">The pattern.</param>
[CakeMethodAlias]
Expand All @@ -40,6 +45,11 @@ public static void MSTest(this ICakeContext context, string pattern)
/// <summary>
/// Runs all MSTest unit tests in the assemblies matching the specified pattern.
/// </summary>
/// <example>
/// <code>
/// MSTest("./Tests/*.UnitTests.dll", new MSTestSettings() { NoIsolation = false });
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="pattern">The pattern.</param>
/// <param name="settings">The settings.</param>
Expand All @@ -64,6 +74,12 @@ public static void MSTest(this ICakeContext context, string pattern, MSTestSetti
/// <summary>
/// Runs all MSTest unit tests in the specified assemblies.
/// </summary>
/// <example>
/// <code>
/// var paths = new List&lt;FilePath&gt;() { "./assemblydir1", "./assemblydir2" };
/// MSTest(paths);
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="assemblyPaths">The assembly paths.</param>
[CakeMethodAlias]
Expand All @@ -75,6 +91,12 @@ public static void MSTest(this ICakeContext context, IEnumerable<FilePath> assem
/// <summary>
/// Runs all MSTest unit tests in the specified assemblies.
/// </summary>
/// <example>
/// <code>
/// var paths = new List&lt;FilePath&gt;() { "./assemblydir1", "./assemblydir2" };
/// MSTest(paths, new MSTestSettings() { NoIsolation = false });
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="assemblyPaths">The assembly paths.</param>
/// <param name="settings">The settings.</param>
Expand Down