Example #1
0
            public GlowContainer Visit(GlowStreamCollection glow, object state)
            {
                foreach (var entry in glow.StreamEntries)
                {
                    entry.Accept(this, state);
                }

                return(glow);
            }
        GlowStreamCollection ConvertStreamCollection(XElement xml)
        {
            var glow = GlowStreamCollection.CreateRoot();
            var glowStreamEntries = from xmlChild in xml.Elements("StreamEntry")
                                    select ConvertStreamEntry(xmlChild);

            foreach (var glowStreamEntry in glowStreamEntries)
            {
                glow.Insert(glowStreamEntry);
            }

            return(glow);
        }
        object IGlowVisitor <XmlWriter, object> .Visit(GlowStreamCollection glow, XmlWriter state)
        {
            state.WriteStartElement("Root");
            state.WriteAttributeString("type", "StreamCollection");

            foreach (var entry in glow.StreamEntries)
            {
                state.WriteStartElement("StreamEntry");
                state.WriteAttributeString("streamIdentifier", XmlConvert.ToString(entry.StreamIdentifier));
                ConvertValue("streamValue", entry.StreamValue, state);
                state.WriteEndElement();
            }

            state.WriteEndElement();
            return(null);
        }
Example #4
0
 bool IGlowVisitor <object, bool> .Visit(GlowStreamCollection glow, object state)
 {
     return(false);
 }
Example #5
0
 public IEnumerable <GlowContainer> Visit(GlowStreamCollection glow, object state)
 {
     yield return(glow);
 }