Ejemplo n.º 1
0
        public void WriteMulti(MultiStateTriggerInfo trigger, XmlWriter writer)
        {
            writer.WriteStartElement("Trigger");
            writer.WriteAttributeString("priority", trigger.Trigger.Priority.ToString());

            if (trigger.States != null)
            {
                var states = string.Join(",", trigger.States);
                writer.WriteElementString("States", states);
            }

            writer.WriteElementString("Condition", trigger.Trigger.Condition);
            _effectXmlWriter.Write(trigger.Trigger.Effect, writer);

            if (trigger.Trigger.Else != null)
                _effectXmlWriter.WriteElse(trigger.Trigger.Else, writer);

            writer.WriteEndElement();
        }
Ejemplo n.º 2
0
        public void WriteMulti(MultiStateTriggerInfo trigger, XmlWriter writer)
        {
            writer.WriteStartElement("Trigger");
            writer.WriteAttributeString("priority", trigger.Trigger.Priority.ToString());

            if (trigger.States != null)
            {
                var states = string.Join(",", trigger.States);
                writer.WriteElementString("States", states);
            }

            writer.WriteElementString("Condition", trigger.Trigger.Condition);
            _effectXmlWriter.Write(trigger.Trigger.Effect, writer);

            if (trigger.Trigger.Else != null)
            {
                _effectXmlWriter.WriteElse(trigger.Trigger.Else, writer);
            }

            writer.WriteEndElement();
        }