/// <summary>
        /// Initializes a new instance of the ServiceHubProvider class
        /// </summary>
        /// <param name="hubAddresses">the hub-addresses for this serviceHub</param>
        /// <param name="basePath">Cnfigures a base-path that extends the host-url of this hub</param>
        /// <param name="factory">a factory that provides access to other plugins</param>
        public ServiceHubProvider(string hubAddresses, PluginFactory factory)
        {
            if (instance != null)
            {
                throw new NotSupportedException("Can have only one active Instance of ServiceHubProvider at a time");
            }

            instance                      = this;
            this.hubAddresses             = hubAddresses;
            this.factory                  = factory;
            appConfigProviders            = new List <IAppConfigureProvider>();
            serviceConfigProviders        = new List <IServicesConfigureProvider>();
            webHostBuilderConfigProviders = new List <IWebHostBuilderConfigureProvider>();
            endPointInitializers          = new List <IEndPointInitializer>();
            listenOptionsConfigurators    = new List <IEndPointDefaultsConfigurator>();
            Broker = new EndPointBroker();
        }
        public ServiceHubProvider(ITVComponents.InterProcessCommunication.MessagingShared.Hub.IServiceHubProvider parent, string hubAddresses, PluginFactory factory)
        {
            if (instance != null)
            {
                throw new NotSupportedException("Can have only one active Instance of ServiceHubProvider at a time");
            }

            instance                      = this;
            this.hubAddresses             = hubAddresses;
            this.factory                  = factory;
            appConfigProviders            = new List <IAppConfigureProvider>();
            serviceConfigProviders        = new List <IServicesConfigureProvider>();
            webHostBuilderConfigProviders = new List <IWebHostBuilderConfigureProvider>();
            endPointInitializers          = new List <IEndPointInitializer>();
            listenOptionsConfigurators    = new List <IEndPointDefaultsConfigurator>();
            Broker     = parent.Broker;
            ownsBroker = false;
        }