コード例 #1
0
ファイル: Extensions.cs プロジェクト: yshadmehr/Convey
        public static IConveyBuilder AddMetrics(this IConveyBuilder builder,
                                                Func <IMetricsOptionsBuilder, IMetricsOptionsBuilder> buildOptions)
        {
            var options = buildOptions(new MetricsOptionsBuilder()).Build();

            return(builder.AddMetrics(options));
        }
コード例 #2
0
    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));
    }
コード例 #3
0
    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));
    }
コード例 #4
0
ファイル: Extensions.cs プロジェクト: yshadmehr/Convey
        public static IConveyBuilder AddMetrics(this IConveyBuilder builder, string sectionName = SectionName)
        {
            var options = builder.GetOptions <MetricsOptions>(sectionName);

            return(builder.AddMetrics(options));
        }