Example #1
0
        /// <summary>
        /// 克隆当前元素到新的宿主模板
        /// </summary>
        /// <param name="ownerTemplate"></param>
        /// <returns></returns>
        internal override Element Clone(Template ownerTemplate)
        {
            SetTag tag = new SetTag(ownerTemplate);

            this.CopyTo(tag);
            tag.Variable = this.Variable == null ? null : this.Variable.Clone(ownerTemplate);
            tag.Output   = this.Output;
            foreach (IExpression exp in this.Values)
            {
                tag.Values.Add((IExpression)(exp.Clone(ownerTemplate)));
            }
            return(tag);
        }
Example #2
0
 /// <summary>
 /// 克隆当前元素到新的宿主模板
 /// </summary>
 /// <param name="ownerTemplate"></param>
 /// <returns></returns>
 internal override Element Clone(Template ownerTemplate)
 {
     SetTag tag = new SetTag(ownerTemplate);
     this.CopyTo(tag);
     tag.Variable = this.Variable == null ? null : this.Variable.Clone(ownerTemplate);
     tag.Output = this.Output;
     foreach (IExpression exp in this.Values)
     {
         tag.Values.Add((IExpression)(exp.Clone(ownerTemplate)));
     }
     return tag;
 }