Skip to content

Instantly share code, notes, and snippets.

View trbngr's full-sized avatar

Chris Martin trbngr

  • Phoenix, AZ, USA
View GitHub Profile
using System;
namespace ConsoleApplication2
{
internal class Program
{
private static void Main()
{
var bar = UniversalFactory.Create<Bar>(23);
Console.Out.WriteLine(bar);
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<packageSources>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
<add key="eventday" value="http://www.myget.org/f/aspnetwebstacknightly/" />
</packageSources>
</configuration>
@trbngr
trbngr / Account.cs
Created July 9, 2015 00:30
Mini Akka Helper DSL
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.0
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
var context = new CrusherContext();
var source = new FileSource(new FileInfo("your js file"));
IEngine engine = context.GetDefaultEngineFor(source);
ICrushResult result = engine.TransformSource(source);
//stream back result.Result
public class TestRunner
{
private static readonly ILog log = LogManager.GetLogger(typeof (TestRunner));
public static void Main()
{
Action foo = () =>
{
const string ID = "gsp";
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApplication3
{
class Program
{
static void Main()
{
@trbngr
trbngr / gist:673616
Created November 12, 2010 02:09
Specification Pattern
using System;
namespace ConsoleApplication3
{
internal class Program
{
private static void Main()
{
var chris = new Person {name = "Chris", age = 36};
@trbngr
trbngr / gist:868281
Created March 13, 2011 17:41
Using Entity inside AggregateRoot - NCQRS
public class Order : AggregateRoot
{
private readonly List<OrderItem> orderItems = new List<OrderItem>();
public void UpdateOrderItem(Guid orderItemId, int quantity)
{
var orderItem = orderItems.Where(q => q.EntityId ==
orderItemId).FirstOrDefault();
if (orderItem == null)
@trbngr
trbngr / gist:983108
Created May 20, 2011 15:06
Get Local Application Data Directory
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
namespace ConsoleApplication1
{
internal class Program
{
@trbngr
trbngr / ExtendCqrsClientBuilder.cs
Created May 25, 2011 22:25
Lokad.Cqrs.SimpleSynchronousMessageSender
using System;
using Lokad.Cqrs.Build.Client;
namespace Lokad.Cqrs.Extensions.Build
{
public static class ExtendCqrsClientBuilder
{
public static CqrsClientBuilder AddSynchronousMessageSender(this CqrsClientBuilder builder)
{