/// <summary>
        /// Adds <see cref="StashboxContainer"/> as the default dependency resolver and the default <see cref="IHubActivator"/>, also registers the available <see cref="IHub"/> and <see cref="PersistentConnection"/> implementations.
        /// </summary>
        /// <param name="container">The container.</param>
        /// <param name="types">The types.</param>
        /// <returns>The container.</returns>
        /// <exception cref="ArgumentNullException">
        /// If <paramref name="container"/> is <c>null</c>.
        /// </exception>
        public static IStashboxContainer AddSignalRWithTypes(this IStashboxContainer container, params Type[] types)
        {
            Shield.EnsureNotNull(container, nameof(container));

            container.RegisterSingleton <Microsoft.AspNet.SignalR.IDependencyResolver, StashboxDependencyResolver>();
            container.RegisterSingleton <IHubActivator, StashboxHubActivator>();
            GlobalHost.DependencyResolver = container.Resolve <Microsoft.AspNet.SignalR.IDependencyResolver>();

            return(container.RegisterHubs(types).RegisterPersistentConnections(types));
        }