Esempio n. 1
0
        /// <summary>
        /// 克隆当前元素到新的宿主模板
        /// </summary>
        /// <param name="ownerTemplate"></param>
        /// <returns></returns>
        public override Element Clone(Template ownerTemplate)
        {
            ForTag tag = new ForTag(ownerTemplate);

            base.CopyTo(tag);
            tag.Index = this.Index == null ? null : this.Index.Clone(ownerTemplate);
            return(tag);
        }
Esempio n. 2
0
 /// <summary>
 /// 克隆当前元素到新的宿主模板
 /// </summary>
 /// <param name="ownerTemplate"></param>
 /// <returns></returns>
 internal override Element Clone(Template ownerTemplate)
 {
     ForTag tag = new ForTag(ownerTemplate);
     base.CopyTo(tag);
     tag.Index = this.Index == null ? null : this.Index.Clone(ownerTemplate);
     return tag;
 }