public static IDaisyServiceCollection AddRaygun <THandler>(this IDaisyServiceCollection daisy) where THandler : RaygunExceptionEventHandler { ThrowIfAlreadyAdded(daisy.ServiceCollection); daisy.ServiceCollection.Configure <RaygunSettings>(daisy.Configuration.GetSection("RaygunSettings")); daisy.ServiceCollection.TryAddSingleton <IRaygunClientProvider, RaygunClientProvider>(); daisy.AddEventHandlerSingleton <THandler>(); return(daisy); }
public static IDaisyServiceCollection AddRaygun(this IDaisyServiceCollection daisy) { return(daisy.AddRaygun <RaygunExceptionEventHandler>()); }