示例#1
0
        public void Write(XmlWriter writer)
        {
            if(Fixture != null) {
                writer.WriteStartElement("Fixture");

                // Attributes go here...
                writer.WriteAttributeString("allowFrameSkip", Fixture.AllowFrameSkip.ToString());
                writer.WriteAttributeString("name", Fixture.Name);
                writer.WriteAttributeString("fixtureDefinitionName", Fixture.FixtureDefinitionName);

                // Channels
                ChannelWriter channelWriter = new ChannelWriter();
                writer.WriteStartElement("Channels");
                foreach(Channel channel in Fixture.Channels) {
                    channelWriter.Channel = channel;
                    channelWriter.Write(writer);
                }
                writer.WriteEndElement(); // Channels

                writer.WriteEndElement(); // Fixture
            }
        }
示例#2
0
        public void Write(XmlWriter writer)
        {
            if (Fixture != null)
            {
                writer.WriteStartElement("Fixture");

                // Attributes go here...
                writer.WriteAttributeString("allowFrameSkip", Fixture.AllowFrameSkip.ToString());
                writer.WriteAttributeString("name", Fixture.Name);
                writer.WriteAttributeString("fixtureDefinitionName", Fixture.FixtureDefinitionName);

                // Channels
                ChannelWriter channelWriter = new ChannelWriter();
                writer.WriteStartElement("Channels");
                foreach (Channel channel in Fixture.Channels)
                {
                    channelWriter.Channel = channel;
                    channelWriter.Write(writer);
                }
                writer.WriteEndElement(); // Channels

                writer.WriteEndElement(); // Fixture
            }
        }
示例#3
0
 protected override void WriteBody(XmlWriter writer)
 {
     // Any fixtures based on this template should be cloned instances with
     // no data, so there shouldn't be any data persisted when this is done.
     ChannelWriter channelWriter = new ChannelWriter();
     writer.WriteStartElement("Channels");
     foreach(Channel channel in Channels) {
         channelWriter.Channel = channel;
         channelWriter.Write(writer);
     }
     writer.WriteEndElement(); // Channels
 }