<commit_before>﻿using System;
using RSB;
using RSB.Diagnostics;
using RSB.Transports.RabbitMQ;

namespace SampleDiscoverableModule
{
    class Program
    {
        static void Main(string[] args)
        {
            var bus = new Bus(RabbitMqTransport.FromConfigurationFile());

            var diagnostics = new BusDiagnostics(bus,"SampleDiscoverableModule");

            diagnostics.RegisterSubsystemHealthChecker("sampleSubsystem1", () => true);

            Console.ReadLine();
        }
    }
}<commit_msg>Refactor to use UseBusDiagnostics extension<commit_after>﻿using System;
using System.Threading;
using RSB;
using RSB.Diagnostics;
using RSB.Transports.RabbitMQ;

namespace SampleDiscoverableModule
{
    class Program
    {
        static void Main(string[] args)
        {
            var bus = new Bus(RabbitMqTransport.FromConfigurationFile());

            bus.UseBusDiagnostics("SampleDiscoverableModule", diagnostics =>
            {
                diagnostics.RegisterSubsystemHealthChecker("sampleSubsystem1", () =>
                {
                    Thread.Sleep(6000);

                    return true;
                });
            });

            Console.ReadLine();
        }
    }
}
{'fraction_non_alphanumeric': 0.09285127362366474, 'fraction_numerical': 0.0049301561216105174, 'mean_word_length': 2.2566844919786098, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4607220', 'n_tokens_mistral': 331, 'n_tokens_neox': 314, 'n_words': 60}