Skip to content

Commit

Permalink
cake-buildGH-750 alias examples for NuGet, NUnit, WiX
Browse files Browse the repository at this point in the history
Fixed previous typo.
  • Loading branch information
m-ritchie committed Apr 2, 2016
1 parent a14b9f3 commit 0364ce5
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 0 deletions.
49 changes: 49 additions & 0 deletions src/Cake.Common/Tools/NUnit/NUnitAliases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ public static class NUnitAliases
/// <summary>
/// Runs all NUnit unit tests in the assemblies matching the specified pattern.
/// </summary>
/// <example>
/// <code>
/// NUnit("./src/UnitTests/*.dll");
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="pattern">The pattern.</param>
[CakeMethodAlias]
Expand All @@ -41,6 +46,14 @@ public static void NUnit(this ICakeContext context, string pattern)
/// Runs all NUnit unit tests in the assemblies matching the specified pattern,
/// using the specified settings.
/// </summary>
/// <example>
/// <code>
/// NUnit("./src/UnitTests/*.dll", new NUnitSettings {
/// Timeout = 4000,
/// StopOnError = true
/// });
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="pattern">The pattern.</param>
/// <param name="settings">The settings.</param>
Expand All @@ -65,6 +78,15 @@ public static void NUnit(this ICakeContext context, string pattern, NUnitSetting
/// <summary>
/// Runs all NUnit unit tests in the specified assemblies.
/// </summary>
/// <example>
/// <code>
/// var assemblies = new [] {
/// "UnitTests1.dll",
/// "UnitTests2.dll"
/// };
/// NUnit(assemblies);
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="assemblies">The assemblies.</param>
[CakeMethodAlias]
Expand All @@ -81,6 +103,12 @@ public static void NUnit(this ICakeContext context, IEnumerable<string> assembli
/// <summary>
/// Runs all NUnit unit tests in the specified assemblies.
/// </summary>
/// <example>
/// <code>
/// var assemblies = GetFiles("./src/UnitTests/*.dll");
/// NUnit(assemblies);
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="assemblies">The assemblies.</param>
[CakeMethodAlias]
Expand All @@ -93,6 +121,18 @@ public static void NUnit(this ICakeContext context, IEnumerable<FilePath> assemb
/// Runs all NUnit unit tests in the specified assemblies,
/// using the specified settings.
/// </summary>
/// <example>
/// <code>
/// var assemblies = new [] {
/// "UnitTests1.dll",
/// "UnitTests2.dll"
/// };
/// NUnit(assemblies, new NUnitSettings {
/// Timeout = 4000,
/// StopOnError = true
/// });
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="assemblies">The assemblies.</param>
/// <param name="settings">The settings.</param>
Expand All @@ -111,6 +151,15 @@ public static void NUnit(this ICakeContext context, IEnumerable<string> assembli
/// Runs all NUnit unit tests in the specified assemblies,
/// using the specified settings.
/// </summary>
/// <example>
/// <code>
/// var assemblies = GetFiles(""./src/UnitTests/*.dll"");
/// NUnit(assemblies, new NUnitSettings {
/// Timeout = 4000,
/// StopOnError = true
/// });
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="assemblies">The assemblies.</param>
/// <param name="settings">The settings.</param>
Expand Down
26 changes: 26 additions & 0 deletions src/Cake.Common/Tools/NuGet/NuGetAliases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,14 @@ public static void NuGetInstallFromConfig(this ICakeContext context, IEnumerable
/// <summary>
/// Installs NuGet packages using the specified API key, source and settings.
/// </summary>
/// <example>
/// <code>
/// var setting = new NuGetSetApiKeySettings {
/// Verbosity = NuGetVerbosity.Detailed
/// };
/// NuGetSetApiKey("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "https://nuget.org/api/v2/", setting);
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="apiKey">The API key.</param>
/// <param name="source">Server URL where the API key is valid.</param>
Expand All @@ -792,6 +800,11 @@ public static void NuGetSetApiKey(this ICakeContext context, string apiKey, stri
/// <summary>
/// Installs NuGet packages using the specified API key and source.
/// </summary>
/// <example>
/// <code>
/// NuGetSetApiKey("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "https://nuget.org/api/v2/");
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="apiKey">The API key.</param>
/// <param name="source">Server URL where the API key is valid.</param>
Expand All @@ -806,6 +819,14 @@ public static void NuGetSetApiKey(this ICakeContext context, string apiKey, stri
/// <summary>
/// Set the proxy settings to be used while connecting to your NuGet feed, including settings.
/// </summary>
/// <example>
/// <code>
/// var setting = new NuGetSetProxySettings {
/// Verbosity = NuGetVerbosity.Detailed
/// };
/// NuGetSetProxy("127.0.0.1:8080", "proxyuser","Pa$$w0rd1", setting);
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="proxy">The url of the proxy.</param>
/// <param name="username">The username used to access the proxy.</param>
Expand All @@ -829,6 +850,11 @@ public static void NuGetSetProxy(this ICakeContext context, string proxy, string
/// <summary>
/// Set the proxy settings to be used while connecting to your NuGet feed.
/// </summary>
/// <example>
/// <code>
/// NuGetSetProxy("127.0.0.1:8080", "proxyuser","Pa$$w0rd1");
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="proxy">The url of the proxy.</param>
/// <param name="username">The username used to access the proxy.</param>
Expand Down
36 changes: 36 additions & 0 deletions src/Cake.Common/Tools/WiX/WiXAliases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ public static class WiXAliases
/// <summary>
/// Compiles all <c>.wxs</c> sources matching the specified pattern.
/// </summary>
/// <example>
/// <code>
/// CandleSettings settings = new CandleSettings {
/// Architecture = Architecture.X64,
/// Verbose = true
/// };
/// WiXCandle("./src/*.wxs", settings);
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="pattern">The globbing pattern.</param>
/// <param name="settings">The settings.</param>
Expand All @@ -42,6 +51,16 @@ public static void WiXCandle(this ICakeContext context, string pattern, CandleSe
/// <summary>
/// Compiles all <c>.wxs</c> sources in the provided source files.
/// </summary>
/// <example>
/// <code>
/// var files = GetFiles("./src/*.wxs");
/// CandleSettings settings = new CandleSettings {
/// Architecture = Architecture.X64,
/// Verbose = true
/// };
/// WiXCandle(files, settings);
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="sourceFiles">The source files.</param>
/// <param name="settings">The settings.</param>
Expand All @@ -61,6 +80,14 @@ public static void WiXCandle(this ICakeContext context, IEnumerable<FilePath> so
/// <summary>
/// Links all <c>.wixobj</c> files matching the specified pattern.
/// </summary>
/// <example>
/// <code>
/// LightSettings settings = new LightSettings {
/// RawArguments = "-O1 -pedantic -v"
/// };
/// WiXLight("./src/*.wixobj", settings);
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="pattern">The globbing pattern.</param>
/// <param name="settings">The settings.</param>
Expand All @@ -86,6 +113,15 @@ public static void WiXLight(this ICakeContext context, string pattern, LightSett
/// <summary>
/// Links all <c>.wixobj</c> files in the provided object files.
/// </summary>
/// <example>
/// <code>
/// var files = GetFiles("./src/*.wxs");
/// LightSettings settings = new LightSettings {
/// RawArguments = "-O1 -pedantic -v"
/// };
/// WiXLight(files, settings);
/// </code>
/// </example>
/// <param name="context">The context.</param>
/// <param name="objectFiles">The object files.</param>
/// <param name="settings">The settings.</param>
Expand Down

0 comments on commit 0364ce5

Please sign in to comment.