示例#1
0
        /// <summary>
        /// Called when a commit is about to be started.
        /// </summary>
        /// <param name="changes">The changes.</param>
        /// <param name="message">The message.</param>
        /// <returns>The <see cref="CancelEventArgs"/>.</returns>
        internal bool OnCommitStarted(MetadataTreeChanges changes, string message)
        {
            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }

            var args = new CommitStartedEventArgs(changes, message);

            CommitStarted?.Invoke(this, args);
            return(!args.Cancel);
        }
示例#2
0
        /// <summary>
        /// Called when a commit is about to be started.
        /// </summary>
        /// <param name="changes">The changes.</param>
        /// <param name="message">The message.</param>
        /// <returns>The <see cref="CancelEventArgs"/>.</returns>
        internal bool OnCommitStarted(ObjectRepositoryChangeCollection changes, string message)
        {
            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }

            var args = new CommitStartedEventArgs(changes, message);

            CommitStarted?.Invoke(this, args);
            return(!args.Cancel);
        }