Beispiel #1
0
 public void Dump(TextWriter tw)
 {
     Contract.Assume(tw != null);
     if (this.IsTop)
     {
         tw.WriteLine("Top");
     }
     else if (this.IsBottom)
     {
         tw.WriteLine("Bot");
     }
     else
     {
         map.Visit(delegate(Key /*!*/ k, Val v) { tw.WriteLine("{0} -> {1}", k.ToString(), v.ToString()); return(VisitStatus.ContinueVisit); });
     }
 }
 public override string ToString()
 {
     if (this.IsTop)
     {
         return("Top");
     }
     else if (this.IsBottom)
     {
         return("Bot");
     }
     else
     {
         StringBuilder sb = new StringBuilder();
         map.Visit(delegate(Key /*!*/ k, Val v) { sb.AppendFormat("({0}->{1}),", k.ToString(), v.ToString()); return(VisitStatus.ContinueVisit); });
         return(sb.ToString());
     }
 }