コード例 #1
0
        /// <summary>
        /// Create an <see cref="IAdoResourceProvider" /> that provides
        /// resources necessary for manipulating the underlying ADO persistence store.
        /// </summary>
        protected override IResourceProvider CreateResourceProvider()
        {
            if (_workBatchService != null)
            {
                return(_workBatchService.CreateResourceProvider(_connectionStringSettings));
            }

            return(AdoResourceProviderFactory.Create(_connectionStringSettings));
        }
コード例 #2
0
        /// <summary>
        /// Create an <see cref="IAdoResourceProvider" /> that provides
        /// resources necessary for manipulating the underlying ADO persistence store.
        /// </summary>
        protected override IResourceProvider CreateResourceProvider()
        {
            string providerName = connectionStringSettings.ProviderName;

            // grab the resource provider from the factory
            IAdoResourceProvider resourceProvider =
                AdoResourceProviderFactory.Create(ConfigurationSectionName,
                                                  providerName);

            if (resourceProvider != null)
            {
                // initialise it with our connection string settings
                resourceProvider.Initialise(connectionStringSettings);
            }

            return(resourceProvider);
        }