Skip to content

Instantly share code, notes, and snippets.

@mattburton
mattburton / DisableRavenAggressiveCachingForMessageEndpoint.cs
Created February 6, 2013 15:39
NSB: Disable RavenDB aggressive cachine at startup
public class DisableRavenAggressiveCachingForMessageEndpoint : IWantToRunAtStartup
{
public void Run()
{
var documentStoreInterfaceType = Type.GetType("Raven.Client.IDocumentStore, NServiceBus.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c");
if (documentStoreInterfaceType == null)
{
throw new InvalidOperationException("Unable to load internalized IDocumentStore type - check to see if assembly version has changed.");
}