/// <summary>
 /// Initializes a new instance of the ServiceHubProvider class
 /// </summary>
 /// <param name="parent">the parent hub-provider</param>
 /// <param name="hubAddresses">the hub-addresses for this serviceHub</param>
 /// <param name="hubFactory">the factory object that is used to create a service hub that handles incoming messages</param>
 /// <param name="factory">a factory that provides access to other plugins</param>
 public ServiceHubProvider(ITVComponents.InterProcessCommunication.MessagingShared.Hub.IServiceHubProvider parent, string hubAddresses, IHubFactory hubFactory, PluginFactory factory)
 {
     this.hubAddresses = hubAddresses;
     this.hubFactory   = hubFactory;
     this.factory      = factory;
     Broker            = parent.Broker;
     ownsBroker        = false;
 }
        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;
        }