コード例 #1
0
        /// <summary>
        /// Visits a single <see cref="CompareOrphan"/> and produces a value of type <typeparamref name="TResult"/>.
        /// </summary>
        /// <param name="orphan">The orphan to visit.</param>
        /// <returns>If the orphan was not null, the value produced by visiting it. Otherwise, the default value of <typeparamref name="TResult"/>.</returns>
        public virtual TResult Visit(CompareOrphan orphan)
        {
            if (orphan != null)
            {
                return(orphan.Accept(this));
            }

            return(default(TResult));
        }
コード例 #2
0
 /// <summary>
 /// Visits a single <see cref="CompareOrphan"/>.
 /// </summary>
 /// <param name="orphan">The orphan to visit.</param>
 public virtual void Visit(CompareOrphan orphan) => orphan.Accept(this);