Skip to content

Instantly share code, notes, and snippets.

View gist:175f7676f2e21191342d3fabfa1388c0
public class ShowHandler_CreateItemCommand : Jasper.Bus.Model.MessageHandler
private readonly IDocumentStore _documentStore;
public ShowHandler_CreateItemCommand(IDocumentStore documentStore)
_documentStore = documentStore;
jeremydmiller / Events.cs
Created Aug 4, 2021
Marten generated code for event storage and projections
View Events.cs
using CommandLineRunner;
using Marten;
using Marten.AsyncDaemon.Testing;
using Marten.AsyncDaemon.Testing.TestingSupport;
using Marten.Events;
using Marten.Events.Aggregation;
using Marten.Internal.Storage;
using Marten.Storage;
using System;
using System.Linq;
jeremydmiller / DocumentStorage.cs
Created Aug 4, 2021
Generated code for Marten Document Storage
View DocumentStorage.cs
using Marten.AsyncDaemon.Testing;
using Marten.AsyncDaemon.Testing.TestingSupport;
using Marten.Internal;
using Marten.Internal.CompiledQueries;
using Marten.Internal.Storage;
using Marten.Linq;
using Marten.Linq.QueryHandlers;
using Marten.Schema;
using Marten.Schema.Arguments;
using Marten.Testing.Documents;
jeremydmiller / StorytellerAspNetCoreLogger
Created Mar 11, 2019
A strategy to plug ASP.Net Core logging into Storyteller test results
View StorytellerAspNetCoreLogger
using System;
using System.Collections.Generic;
using Baseline;
using Microsoft.Extensions.Logging;
using StoryTeller.Results;
using StoryTeller.Util;
namespace Jasper.TestSupport.Storyteller.Logging
/// <summary>
View gist:7eae90eda21cc47ed24fa30623f9feb2
ServiceType Namespace Lifecycle Description Name
IContainer Lamar Scoped Current IContainer IContainer
IEngine Lamar.Testing.IoC.Diagnostics Transient new Hemi() The Hemi
jeremydmiller / post_one.cs
Last active May 16, 2018
Code Generated for post_one method
View post_one.cs
public class SqlSender_HomeEndpoint_post_one : Jasper.Http.Model.RouteHandler
private readonly SqlServerSettings _sqlServerSettings;
private readonly IMessagingRoot _messagingRoot;
public SqlSender_HomeEndpoint_post_one(SqlServerSettings sqlServerSettings, IMessagingRoot messagingRoot)
_sqlServerSettings = sqlServerSettings;
_messagingRoot = messagingRoot;
jeremydmiller / bluemilk.txt
Created Feb 20, 2018
BlueMilk v. StructureMap Performance
View bluemilk.txt
What this benchmark does is bootstrap an ASP.Net Core system with MVC and AddLogging,
then try to create every single registered type that is common between the two
configurations. Throws out the initial run.
Method | Mean | Error | StdDev |
------------- |----------:|---------:|---------:|
StructureMap | 516.72 us | 4.310 us | 3.599 us |
BlueMilk | 86.04 us | 1.214 us | 1.076 us |
View gist:41bd108bb2103d686d7e4363bfcdf328
public class RavenDBRepository<T, I> : IRepository<T, I> where T: IAggregateRoot<I> where I : struct, IIdentity<I>
private readonly IAsyncDocumentSession _session;
public RavenDBRepository(IAsyncDocumentSession session)
_session = session;
public async Task<T> GetAsync(I identity)
View gist:2818a990ce26ae0a2edf85fdb627e028
// Yes Dorothy, this is some circular reference action going on here.
// We'll get it sorted out later
View gist:9a89280b37694ba382d4be52aa807086
using System;
using System.Security.Cryptography.X509Certificates;
namespace BlueMilk.Tests
public class WorkItem
public DateTime Started { get; set; }