示例#1
0
        /// <summary>
        /// Sets the current resource connection factory object to a
        /// <see cref="DefaultResourceConnectionFactory"/>
        /// instance with the specified settings.
        /// </summary>
        /// <param name="settings">Configuration settings to be used.</param>
        public static void Configure(ResourceConnectionFactorySettings settings)
        {
            var oldValue = Current;

            Current = new DefaultResourceConnectionFactory(settings);
            OnConfigurationChanged(
                new ConfigurationChangedEventArgs <IResourceConnectionFactory>(oldValue, Current));
        }
示例#2
0
        /// <summary>
        /// Sets the current resource connection factory object to the specified one.
        /// </summary>
        /// <param name="provider">
        /// Resource connection factory object to be used as current
        /// </param>
        public static void Configure(IResourceConnectionFactory provider)
        {
            var oldValue = Current;

            Current = provider;
            OnConfigurationChanged(
                new ConfigurationChangedEventArgs <IResourceConnectionFactory>(oldValue, Current));
        }