Skip to content

Instantly share code, notes, and snippets.

View wwwlicious's full-sized avatar

Scott Mackay wwwlicious

View GitHub Profile
@wwwlicious
wwwlicious / main.cs
Created December 5, 2020 16:27
SnakeCake_Deserialize_CustomScope
using System.Linq;
using ServiceStack;
using ServiceStack.Text;
public class Test
{
public string Id {get;set;}
public string IdName {get;set;}
}
@wwwlicious
wwwlicious / test.cs
Created May 20, 2019 13:48
populating child object from anonymous
namespace UseCase.Tests
{
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using ServiceStack.Data;
@wwwlicious
wwwlicious / Cake_Teamcity_Metarunner.xml
Created July 8, 2016 11:34
Provides a teamcity metarunner that executes a cake script
<?xml version="1.0" encoding="UTF-8"?>
<meta-runner name="Cake">
<description>Execute a cake script</description>
<settings>
<parameters>
<param name="mr.Cake.script" value="" spec="text description='The location of the Cake Script, relative to the root folder' display='normal' label='Cake Script:'" />
<param name="mr.Cake.target" value="" spec="text description='The name of the Target within the Cake Script to execute' display='normal' label='Target:'" />
<param name="mr.Cake.verbosity" value="" spec="select data_1='Quiet' data_3='Minimal' data_5='Normal' data_7='Verbose' data_9='Diagnostic' description='The logging level for the Cake Script' display='normal' label='Verbosity:'" />
<param name="mr.Cake.arguments" value="" spec="text description='Additional arguments to pass to Cake Script' display='normal' label='Cake Arguments:'" />
</parameters>
.masthead { background-color: #663399 ; }
.dash { background-color: #7871AA; }
.signal-bar { background-color: #663399; }
.route-nav-dash #nav-dash, .route-nav-events #nav-events, .route-nav-settings #nav-settings, .route-nav-user #nav-user {
background-color: #663399;
}
.signal-bar .show-hide-toggle {
background-color: #7871AA;
}
.event.expanded {
namespace ServiceStackCacheServiceTesting
{
using System;
using ServiceStack;
using ServiceStack.Caching;
using ServiceStack.Testing;
using ServiceStack.Web;
using Xunit;
@wwwlicious
wwwlicious / ServicestackExceptionEnricher.cs
Created October 21, 2015 12:36
ServicestackExceptionEnricher for Serilog
namespace Logging
{
using Serilog.Core;
using Serilog.Events;
using ServiceStack.ServiceClient.Web;
public class ServiceStackExceptionEnricher : ILogEventEnricher
{
public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
@wwwlicious
wwwlicious / teamcity_xunit_dotcover_metarunner.xml
Last active November 14, 2018 08:17
UPDATE: Now part of the powerpack. Get the latest version https://github.com/JetBrains/meta-runner-power-pack/tree/master/xUnit.net-dotCover. Provides dotCover functionality for your xunit tests in TeamCity. Supports local or remote nuget feeds, different runners per teamcity buildconfig, supports .net legacy activation, xunit traits and custom …
<?xml version="1.0" encoding="UTF-8"?>
<meta-runner name="xUnit.net + dotCover 💕">
<description>Run xUnit.net tests with dotCover coverage: http://www.wwwlicious.com/2015/09/25/teamcity-dotcover-xunit-at-last/</description>
<settings>
<parameters>
<param name="xUnitNet.nugetSource" value="http://www.nuget.org/api/v2/" spec="text description='The nuget source url for the xunit runner' display='normal' label='Xunit Runner Nuget Source'" />
<param name="xUnitNet.executable" value="xunit.console.exe" spec="text description='The xunit runner executable to use in the nuget package' display='normal' label='Xunit Runner Executable'" />
<param name="xUnitNet.executable.args" value="" spec="text description='Custom xunit runner arguments' display='normal' label='Xunit Runner Executable additional arguments'" />
<param name="xUnitNet.executable.legacymode" value="false" spec="checkbox checkedValue='true' description='For mixed mode assemblies, enables xunit runner to use legacy activiatio
@wwwlicious
wwwlicious / ncovertask.cs
Last active August 29, 2015 14:02
Truncate NCover 3.x coverage
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="TruncateNCoverTrend.cs" company="wwwlicious">
// Copyright (c) 2011 All Rights Reserved
// </copyright>
// <summary>
// Defines the TruncateNCoverTrend Build Task. This task truncates the trend file to a specific time period
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace wwwlicious.MSBuild
@wwwlicious
wwwlicious / Add-SolutionFolder
Last active December 18, 2015 20:29
Creates a VS solution folder if it does not exist when passed a EnvDTE80.Solution2 object and a folder name.
function Add-SolutionFolder {
[CmdletBinding()]
param(
[Parameter(Position=0, Mandatory=$true)]
$solution,
[Parameter(Position=1, Mandatory=$true)]
[string]$folderName
)
$exists = $false