Esempio n. 1
0
        /// <summary>
        /// The recursive run call that will run until we hit the leaf section
        /// </summary>
        /// <param name="context">
        /// The context which will be used and updated in the calculation
        /// </param>
        /// <param name="section">
        /// The section that is currently being executed
        /// </param>
        /// <returns>
        /// The <see cref="Task"/> with the context updated
        /// </returns>
        private async Task <TContext> Run(TContext context, ISection section)
        {
            if (section.IsTrunk())
            {
                return(await this.RunTrunk(context, section));
            }

            return(await this.RunBranch(context, section));
        }