예제 #1
0
        /// <summary>
        /// Adds an expiration policy to the composition.
        /// </summary>
        /// <param name="expirationPolicy">
        /// The expiration policy.
        /// </param>
        /// <returns>
        /// The <see cref="CompositeExpirationPolicy"/>.
        /// </returns>
        public CompositeExpirationPolicy Add(ExpirationPolicy expirationPolicy)
        {
            _synchronizationContext.Execute(() => _expirationPolicies.Add(expirationPolicy));

            return(this);
        }
예제 #2
0
        /// <summary>
        /// Adds an expiration policy to the composition.
        /// </summary>
        /// <param name="expirationPolicy">
        /// The expiration policy.
        /// </param>
        /// <returns>
        /// The <see cref="CompositeExpirationPolicy"/>.
        /// </returns>
        public CompositeExpirationPolicy Add(ExpirationPolicy expirationPolicy)
        {
            _synchronizationContext.Execute(() => _expirationPolicies.Add(expirationPolicy));

            return this;
        }