예제 #1
0
        /// <summary>
        /// Create an <see cref="ITrackingServiceResourceAccessor" /> that is responsible
        /// for manipulating the underlying tracking store.
        /// </summary>
        /// <param name="resourceProvider">
        /// The active <see cref="IResourceProvider" />.
        /// </param>
        protected override ITrackingProfileResourceAccessor CreateAccessor(IResourceProvider resourceProvider)
        {
            IAdoResourceProvider adoResourceProvider = resourceProvider as IAdoResourceProvider;

            if (adoResourceProvider == null)
            {
                throw new ArgumentException(RM.Get_Error_NotIAdoResourceProvider());
            }

            return(AdoTrackingResourceAccessorFactory.Create(
                       adoResourceProvider, nameResolver, valueReader));
        }
예제 #2
0
        /// <summary>
        /// Create an <see cref="ITrackingChannelResourceAccessor" /> that is responsible
        /// for manipulating the underlying tracking store.
        /// </summary>
        /// <param name="resourceProvider">
        /// The active <see cref="IResourceProvider" />.
        /// </param>
        /// <param name="transaction">
        /// Transaction to perform operations within.
        /// </param>
        protected override ITrackingChannelResourceAccessor CreateAccessor(IResourceProvider resourceProvider, Transaction transaction)
        {
            IAdoResourceProvider adoResourceProvider = resourceProvider as IAdoResourceProvider;

            if (adoResourceProvider == null)
            {
                throw new ArgumentException(RM.Get_Error_NotIAdoResourceProvider());
            }

            return(AdoTrackingResourceAccessorFactory.Create(
                       adoResourceProvider, _nameResolver, _valueReader,
                       transaction, stateProvider));
        }