public static IConveyBuilder AddMetrics(this IConveyBuilder builder, Func <IMetricsOptionsBuilder, IMetricsOptionsBuilder> buildOptions) { var options = buildOptions(new MetricsOptionsBuilder()).Build(); return(builder.AddMetrics(options)); }
public static IConveyBuilder AddMetrics(this IConveyBuilder builder, Func <IMetricsOptionsBuilder, IMetricsOptionsBuilder> buildOptions, string appSectionName = AppSectionName) { if (string.IsNullOrWhiteSpace(appSectionName)) { appSectionName = AppSectionName; } var metricsOptions = buildOptions(new MetricsOptionsBuilder()).Build(); var appOptions = builder.GetOptions <AppOptions>(appSectionName); return(builder.AddMetrics(metricsOptions, appOptions)); }
public static IConveyBuilder AddMetrics(this IConveyBuilder builder, string metricsSectionName = MetricsSectionName, string appSectionName = AppSectionName) { if (string.IsNullOrWhiteSpace(metricsSectionName)) { metricsSectionName = MetricsSectionName; } if (string.IsNullOrWhiteSpace(appSectionName)) { appSectionName = AppSectionName; } var metricsOptions = builder.GetOptions <MetricsOptions>(metricsSectionName); var appOptions = builder.GetOptions <AppOptions>(appSectionName); return(builder.AddMetrics(metricsOptions, appOptions)); }
public static IConveyBuilder AddMetrics(this IConveyBuilder builder, string sectionName = SectionName) { var options = builder.GetOptions <MetricsOptions>(sectionName); return(builder.AddMetrics(options)); }