예제 #1
0
 /// <summary>
 /// Will remove the amendment and the virtual paragraph.
 /// </summary>
 /// <param name="parentSection"></param>
 /// <returns></returns>
 public override bool Deny(OperativeSection parentSection)
 {
     parentSection.RemoveAmendment(this);
     return(true);
 }
예제 #2
0
        /// <summary>
        /// Removes the operative section with all children and amendments that are on it.
        /// </summary>
        /// <param name="parentSection"></param>
        /// <returns></returns>
        public override bool Apply(OperativeSection parentSection)
        {
            var paragraph = parentSection.FindOperativeParagraph(this.TargetSectionId);

            if (!parentSection.Paragraphs.Contains(paragraph))
            {
                return(false);
            }

            parentSection.Paragraphs.Remove(paragraph);

            parentSection.AmendmentsForOperativeParagraph(this.TargetSectionId).ForEach(n => parentSection.RemoveAmendment(n));
            return(true);
        }