This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Tools and addins | |
| #addin "nuget:?package=System.Management.Automation&version=6.1.7601.17515" | |
| using System.Collections; | |
| using System.Management.Automation; | |
| using System.Management.Automation.Internal; | |
| using System.Management.Automation.Runspaces; | |
| using System.Threading; | |
| /////////////////////////////////////////////////////////////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var platform = (int)Environment.OSVersion.Platform; | |
| if (platform == (int)PlatformID.MacOSX) | |
| { | |
| OperatingSystem = OperatingSystemFamily.OSX; | |
| } | |
| else if ((platform == 4) || (platform == 6) || (platform == 128)) | |
| { | |
| OperatingSystem = OperatingSystemFamily.Linux; | |
| } | |
| else if((platform <= 3) || (platform == 5)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Cake script | |
| #r "System.Net" | |
| using System.Net; | |
| var request = (HttpWebRequest)WebRequest.Create("http://google.com"); | |
| var response = (HttpWebResponse)request.GetResponse(); | |
| var statusCode = response.StatusCode; | |
| Information("Received {0}!", statusCode); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class BuilderExtensionsTests | |
| { | |
| public class TheRegisterFooMethod | |
| { | |
| [Fact] | |
| public void Should_Register_Foo_With_Container() | |
| { | |
| // Given | |
| var builder = Substitute.For<IBuilder>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Cake.Common.Diagnostics; | |
| using Cake.Core; | |
| using Cake.Core.Diagnostics; | |
| using Cake.Frosting; | |
| public class Program | |
| { | |
| public static int Main(string[] args) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": 2, | |
| "targets": { | |
| ".NETCoreApp,Version=v1.0": { | |
| "Cake.Common/0.16.0-alpha0084": { | |
| "type": "package", | |
| "dependencies": { | |
| "Cake.Core": "0.16.0-alpha0084", | |
| "System.ComponentModel.TypeConverter": "4.1.0", | |
| "System.Runtime.Serialization.Json": "4.0.2", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": 2, | |
| "targets": { | |
| ".NETCoreApp,Version=v1.0": { | |
| "Cake.Common/0.16.0-alpha0084": { | |
| "type": "package", | |
| "dependencies": { | |
| "Cake.Core": "0.16.0-alpha0084", | |
| "System.ComponentModel.TypeConverter": "4.1.0", | |
| "System.Runtime.Serialization.Json": "4.0.2", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Get-NuGetPackage( | |
| [string]$Source = "http://nuget.org", | |
| [string]$Package, | |
| [string]$Version) | |
| { | |
| $Url = "$Source/api/v2/package/$Package/$Version" | |
| $Output = Join-Path (Get-Location) "$Package.$Version.nupkg" | |
| (New-Object System.Net.WebClient).DownloadFile($Url, $Output) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Task("Test").Does(() => { | |
| Information("Testing stuff..."); | |
| } | |
| Task("Deploy").IsDependentOn("Test").Does(() => { | |
| Information("Heavy deploy action"); | |
| } | |
| RunTarget("Deploy"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Reflection; | |
| using Xunit.Sdk; | |
| namespace MyProject.Tests | |
| { | |
| public sealed class EmbeddedResourceDataAttribute : DataAttribute | |
| { |