Ejemplo n.º 1
0
        /// <summary>
        /// <see cref="IElement.Clone" />
        /// </summary>
        public override object Clone()
        {
            var conditional = new ConditionalInstruction();

            if (_ifCondition != null)
            {
                conditional.IFCondition = (ICondition)_ifCondition.Clone();
            }
            if (_ifInstruction != null)
            {
                conditional.IFInstruction = (IInstruction)_ifInstruction.Clone();
            }
            if (_elseInstruction != null)
            {
                conditional.ELSEInstruction = (IInstruction)_elseInstruction.Clone();
            }
            return(conditional);
        }