Exemple #1
0
        /// <summary>
        ///     Tests if this modification represents a removed operation to the original log source.
        /// </summary>
        /// <param name="removedSection">The section of the log source which was removed.</param>
        /// <returns></returns>
        public bool IsRemoved(out LogSourceSection removedSection)
        {
            if (_modificationType == ModificationType.Removed)
            {
                removedSection = _section;
                return(true);
            }

            removedSection = default;
            return(false);
        }
Exemple #2
0
        /// <summary>
        ///     Tests if this modification represents an append operation to the original log source.
        /// </summary>
        /// <param name="appendedSection">The section of the log source which was appended.</param>
        /// <returns></returns>
        public bool IsAppended(out LogSourceSection appendedSection)
        {
            if (_modificationType == ModificationType.Appended)
            {
                appendedSection = _section;
                return(true);
            }

            appendedSection = default;
            return(false);
        }
Exemple #3
0
 public static LogSourceModification Removed(LogSourceSection section)
 {
     return(new LogSourceModification(ModificationType.Removed, section));
 }
Exemple #4
0
 private LogSourceModification(ModificationType modificationType, LogSourceSection section)
 {
     _modificationType = modificationType;
     _section          = section;
 }
Exemple #5
0
 /// <summary>
 ///     Creates a modification which signals to the listener that the given amount of <see cref="ILogEntry" />s were
 ///     appended
 ///     to the <see cref="ILogSource" />.
 /// </summary>
 /// <param name="section"></param>
 /// <returns></returns>
 public static LogSourceModification Appended(LogSourceSection section)
 {
     return(new LogSourceModification(ModificationType.Appended, section));
 }