This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Converts the MSpec (http://github.com/machine/machine.specifications) xml | |
output to JUnit output format. | |
The aim of this transformation is to integrate MSpec tests to Jenkins CI. | |
Jenkins understands test results presented in JUnit format. | |
--> |
This file contains 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
<Target Name="TransformMSpectToJUnit"> | |
<XslTransformation | |
XmlInputPaths="$(SpecsResults)" | |
XslInputPath="$(MSpecToJUnitTransform)" | |
OutputPaths="$(SpecsAsJUnitOutput)"/> | |
</Target> |
This file contains 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
$scriptDir = split-path $script:MyInvocation.MyCommand.Path | |
$nuget = "$scriptDir\tools\NuGet.exe" | |
$packagesDir = "$scriptDir\src\Packages" | |
$packagesConfigs = get-content "$packagesDir\repositories.config" ` | |
| select-string -pattern "<repository path=" ` | |
| foreach { $_ -replace "\s*<repository path=""", """$packagesDir\" } ` | |
| foreach { $_ -replace "\s*/>" } | |
foreach ($pathToPackagesConfig in $packagesConfigs) |
This file contains 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
[RestService("/orders/{id}", "GET")] | |
[RestService("/orders/by-code/{code}", "GET")] | |
[RestService("/orders/search", "GET")] | |
public class GetOrders { | |
public int? Id { get; set; } | |
public string Code { get; set; } | |
public string Name { get; set; } | |
public string Customer { get; set; } | |
} |
This file contains 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
// Response types omitted. | |
// Note that request types now marked with IRequest<TResponse> interface. | |
// This allows Send method to determine response type at compile time. | |
[RestService("/orders/{id}", "GET")] | |
[RestService("/orders/by-code/{code}", "GET")] | |
[RestService("/orders/search", "GET")] | |
public class GetOrders : IRequest<GetOrdersResponse> { | |
public int? Id { get; set; } | |
public string Code { get; set; } |
This file contains 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
namespace ServiceStack.Service | |
{ | |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using ServiceStack.Service; | |
using ServiceStack.ServiceClient.Web; | |
using ServiceStack.ServiceHost; |
This file contains 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 Order { | |
public int Id { get; set; } | |
public DateTime OrderedAt { get; set } | |
public IList<OrderLine> OrderLines { get; set } | |
public Person Customer { get; set } | |
} | |
public class OrderLine { | |
public int Id { get; set; } | |
public int Count { get; set; } |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a ="http://microsoft.com/schemas/VisualStudio/TeamTest/2006" xmlns:b ="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" > | |
<xsl:output method="xml" indent="yes" /> | |
<xsl:template match="/"> | |
<testsuites> | |
<!-- MSTest outcomes: --> | |
<!-- total="218" executed="53" passed="52" error="0" failed="0" timeout="0" aborted="0" inconclusive="1" passedButRunAborted="0" notRunnable="0" notExecuted="165" disconnected="0" warning="0" completed="0" inProgress="0" pending="0" --> | |
<xsl:variable name="buildName" select="//a:TestRun/@name"/> | |
<xsl:variable name="numberOfTests" select="count(//a:UnitTestResult/@outcome) + count(//b:UnitTestResult/@outcome)"/> | |
<xsl:variable name="numberOfFailures" select="count(//a:UnitTestResult/@outcome[.!='Passed' and .!='Inconclusive' and .!='NotExecuted' and .!='Aborted']) + count(//b:UnitTestResult/@outcome[.!='Passed' and .!='Inconclusive' and |
This file contains 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
ALTER DATABASE <dbname> SET OFFLINE WITH ROLLBACK IMMEDIATE | |
GO | |
ALTER DATABASE <dbname> SET MULTI_USER | |
GO | |
ALTER DATABASE <dbname> SET ONLINE | |
GO |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer