public static SubscriptionConfiguration Configuration()
        {
            var section       = ConfigurationSectionProvider.Open <SubscriptionSection>("shuttle", "subscription");
            var configuration = new SubscriptionConfiguration();

            var connectionStringName = "Subscription";

            if (section != null)
            {
                connectionStringName    = section.ConnectionStringName;
                configuration.Subscribe = section.Subscribe;
            }

            var settings = ConfigurationManager.ConnectionStrings[connectionStringName];

            if (settings == null)
            {
                throw new InvalidOperationException(string.Format(Resources.ConnectionStringMissing, connectionStringName));
            }

            configuration.ProviderName     = settings.ProviderName;
            configuration.ConnectionString = settings.ConnectionString;

            return(configuration);
        }
        public static SubscriptionConfiguration Configuration()
        {
            var section       = ConfigurationSectionProvider.Open <SubscriptionSection>("shuttle", "subscription");
            var configuration = new SubscriptionConfiguration();

            var connectionStringName = "Subscription";

            if (section != null)
            {
                connectionStringName    = section.ConnectionStringName;
                configuration.Subscribe = section.Subscribe;
            }

            configuration.ProviderName     = GetSettings(connectionStringName).ProviderName;
            configuration.ConnectionString = GetSettings(connectionStringName).ConnectionString;

            return(configuration);
        }