public ServiceLifetimeManager(
            IServiceConnectionManager <THub> serviceConnectionManager,
            IClientConnectionManager clientConnectionManager,
            IHubProtocolResolver protocolResolver,
            ILogger <ServiceLifetimeManager <THub> > logger,
            AzureSignalRMarkerService marker,
            IOptions <HubOptions> globalHubOptions,
            IOptions <HubOptions <THub> > hubOptions,
            IBlazorDetector blazorDetector)
            : base(
                serviceConnectionManager,
                protocolResolver,
                globalHubOptions,
                hubOptions, logger)
        {
            // after core 3.0 UseAzureSignalR() is not required.
#if NETSTANDARD2_0
            if (!marker.IsConfigured)
            {
                throw new InvalidOperationException(MarkerNotConfiguredError);
            }
#endif
            _clientConnectionManager = clientConnectionManager;

            if (hubOptions.Value.SupportedProtocols != null && hubOptions.Value.SupportedProtocols.Any(x => x.Equals(Constants.Protocol.BlazorPack, StringComparison.OrdinalIgnoreCase)))
            {
                blazorDetector?.TrySetBlazor(typeof(THub).Name, true);
            }
        }
        public ServiceLifetimeManager(
            IServiceConnectionManager <THub> serviceConnectionManager,
            IClientConnectionManager clientConnectionManager,
            IHubProtocolResolver protocolResolver,
            ILogger <ServiceLifetimeManager <THub> > logger,
            AzureSignalRMarkerService marker,
            IOptions <HubOptions> globalHubOptions,
            IOptions <HubOptions <THub> > hubOptions)
            : base(
                serviceConnectionManager,
                protocolResolver,
                globalHubOptions,
                hubOptions, logger)
        {
            // after core 3.0 UseAzureSignalR() is not required.
#if NETSTANDARD2_0
            if (!marker.IsConfigured)
            {
                throw new InvalidOperationException(MarkerNotConfiguredError);
            }
#endif
            _clientConnectionManager = clientConnectionManager;
        }
        public ServiceLifetimeManager(IServiceConnectionManager <THub> serviceConnectionManager,
                                      IClientConnectionManager clientConnectionManager, IHubProtocolResolver protocolResolver,
                                      ILogger <ServiceLifetimeManager <THub> > logger, AzureSignalRMarkerService marker)
            : base(serviceConnectionManager, protocolResolver)
        {
            // after core 3.0 UseAzureSignalR() is not required.
#if !NETCOREAPP3_0
            if (!marker.IsConfigured)
            {
                throw new InvalidOperationException(MarkerNotConfiguredError);
            }
#endif

            _serviceConnectionManager = serviceConnectionManager;
            _clientConnectionManager  = clientConnectionManager;
            _allProtocols             = protocolResolver.AllProtocols;
            _logger = logger;
        }
        public ServiceLifetimeManager(IServiceConnectionManager <THub> serviceConnectionManager,
                                      IClientConnectionManager clientConnectionManager, IHubProtocolResolver protocolResolver,
                                      ILogger <ServiceLifetimeManager <THub> > logger, AzureSignalRMarkerService marker)
            : base(serviceConnectionManager, protocolResolver)
        {
            if (!marker.IsConfigured)
            {
                throw new InvalidOperationException(MarkerNotConfiguredError);
            }

            _serviceConnectionManager = serviceConnectionManager;
            _clientConnectionManager  = clientConnectionManager;
            _allProtocols             = protocolResolver.AllProtocols;
            _logger = logger;
        }