Example #1
0
        public RiakBucketProperties RemovePreCommitHook(IRiakPreCommitHook commitHook)
        {
            if (PreCommitHooks != null)
            {
                PreCommitHooks.RemoveAll(x => Equals(x, commitHook));
            }

            return(this);
        }
        /// <summary>
        /// Remove a pre-commit hook from the bucket properties.
        /// </summary>
        /// <param name="commitHook">The <see cref="IRiakPreCommitHook"/> to remove.</param>
        /// <returns>A reference to the current properties object.</returns>
        /// <remarks>
        /// Pre/Post-commit hooks are not typically modified.
        /// </remarks>
        public RiakBucketProperties RemovePreCommitHook(IRiakPreCommitHook commitHook)
        {
            if (PreCommitHooks != null)
            {
                PreCommitHooks.RemoveAll(x => Equals(x, commitHook));

                if (PreCommitHooks.Count == 0)
                {
                    HasPrecommit = false;
                }
            }

            return(this);
        }