public static IPipelines RegisterCosmosLogging(this IPipelines pipelines, TinyIoCContainer container, Action <ILogServiceCollection> config) { if (pipelines == null) { throw new ArgumentNullException(nameof(pipelines)); } if (container == null) { throw new ArgumentNullException(nameof(container)); } var serviceImpl = new NancyLogServiceCollection(); config?.Invoke(serviceImpl); RegisterCoreComponents(serviceImpl); BuildSoloContainer(serviceImpl); UpdateStaticProvider(); UpdateTinyIoCContainer(container); NancyPipelinesHook.RegisterLoggingHandlers(pipelines); return(pipelines); }
/// <summary> /// Register Cosmos Logging in NancyFX pipeline /// </summary> /// <param name="pipelines"></param> /// <param name="container"></param> /// <param name="config"></param> /// <returns></returns> /// <exception cref="ArgumentNullException"></exception> public static IPipelines RegisterCosmosLogging(this IPipelines pipelines, ILifetimeScope container, Action <ILogServiceCollection> config) { if (pipelines == null) { throw new ArgumentNullException(nameof(pipelines)); } if (container == null) { throw new ArgumentNullException(nameof(container)); } var serviceImpl = new AutofacNancyLogServiceCollection(); config?.Invoke(serviceImpl); RegisterCoreComponents(serviceImpl); UpdateAutofacContainer(container, serviceImpl); UpdateStaticProvider(container); NancyPipelinesHook.RegisterLoggingHandlers(pipelines); RegisterEnricherComponents(serviceImpl); return(pipelines); }