Skip to content

Instantly share code, notes, and snippets.

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; }
View gist:1b431e6cf7bae816b12a2607c4cc20f6
protected Upsert(object document)
// The first time I checked for "Document == null", so it threw
if (document == null) throw new ArgumentNullException(nameof(document));
Document = document;
View gist:479c9be61cbabdb25b1be4642fb18637
Hey @all, happy New Year to everybody. I’m needing to get Storyteller 4 ready for our internal usage soon and I’m running out of steam, so I’ve pared back the goals for the 4.0 release. You can see everything I’m thinking for a release timeline in the Github milestones:
What’s in: markdown persistence, the mechanism to define the fixture language in markdown, the step through mode, bug fixes, and CoreCLR/dotnet cli support
I’m pushing off being able to export spec visualizations, more performance tracking, and spec tagging until 4.1 sometime around maybe the end of the 1st quarter.
Any thoughts on any of this? Anybody willing to try out the 4.0 alpha in a couple weeks?
And I’m definitely bailing out on specification parallelization until a 5.0 release later this year
View gist:b4703d3304b6af46e24264611b498fd7
ASP.Net Core and its MVC framework represent a big change from what's come before from Microsoft.
In this talk I'd like to dive deep into the internals of MVC Core to see what lessons we can
learn about designing software infrastructure in our own work. In specific, I'd like to dive into
MVC Core's usage of middleware, its runtime pipeline, how it supports extensibility scenarios,
diagnostics, and application configuration. As an author and maintainer of a
common IoC tool (StructureMap), I can speak to the much more complicated way that MVC Core
uses IoC containers within its pipeline and the places where I think their usage is going to be
problematic for users.
As the author of a previous OSS web framework (FubuMVC), I can share some insights by comparing