Skip to content

Instantly share code, notes, and snippets.

@blair55
blair55 / AutoUpdater.csproj
Created December 13, 2012 14:20
ClickOnce Auto Update Application
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RootNamespace>AutoUpdater</RootNamespace>
<AssemblyName>AutoUpdater</AssemblyName>
<!-- begin include -->
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<IsWebBootstrapper>true</IsWebBootstrapper>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
@blair55
blair55 / AggressivelyCacheAttribute.cs
Created November 7, 2012 22:35
WebAPI ActionFilter Dependency Injection with StructureMap
using System;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;
using Raven.Client;
namespace MyWebApi.Attributes
{
public class AggressivelyCacheAttribute : ActionFilterAttribute
{
public IDocumentStore DocumentStore { get; set; }
@blair55
blair55 / Base Test Class
Created October 10, 2012 21:25
AutoMocking with StructureMap and Moq in BDD Cucumber Style
public abstract class GivenA<T> where T : class
{
private MoqAutoMocker<T> _autoMocker = new MoqAutoMocker<T>();
protected T Target { get; private set; }
[SetUp]
public void Setup()
{
Given();