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); }
bool IGlowVisitor <object, bool> .Visit(GlowStreamCollection glow, object state) { return(false); }
public IEnumerable <GlowContainer> Visit(GlowStreamCollection glow, object state) { yield return(glow); }