Beispiel #1
0
        /// <summary>
        /// 创建注释的副本
        /// </summary>
        /// <param name="factory">用于创建注释的构建器</param>
        /// <param name="comment">需要被创建副本的注释</param>
        /// <returns>注释的未分配副本</returns>
        public static IFreeComment MakeCopy(this IHtmlNodeFactory factory, IHtmlComment comment)
        {
            if (factory == null)
            {
                throw new ArgumentNullException("factory");
            }

            if (comment == null)
            {
                throw new ArgumentNullException("comment");
            }

            return(factory.CreateComment(comment.Comment));
        }