예제 #1
0
 public void Write(OtherNode node, XmlWriter writer)
 {
     writer.WriteElement("other", delegate
     {
         var residents = node.GetBasketCountries();
         foreach (var resident in residents)
         {
             this.WriteOnceResolved(resident, writer);
         }
     });
 }
예제 #2
0
        public OtherNode Copy(OtherNode node)
        {
            var result          = new OtherNode();
            var basketCountries = node.GetBasketCountries();

            foreach (var basketCountry in basketCountries)
            {
                var copied = this.Copy(basketCountry);
                result.RegisterResident(copied);
            }
            return(result);
        }
예제 #3
0
        public IEnumerable <INode> TraverseOther(OtherNode otherNode)
        {
            yield return(otherNode);

            var residents = otherNode.GetBasketCountries();

            foreach (var resident in residents)
            {
                var nodes = this.TraverseOnceResolved(resident);
                foreach (var node in nodes)
                {
                    yield return(node);
                }
            }
        }