示例#1
0
        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);
        }
示例#2
0
 public static IDaisyServiceCollection AddRaygun(this IDaisyServiceCollection daisy)
 {
     return(daisy.AddRaygun <RaygunExceptionEventHandler>());
 }