Esempio n. 1
0
 public static Dictionary <Type, VisitorDelegate> GetVisitors(CommonMarkVisitor visitor, string name)
 {
     return(visitor
            .GetType()
            .GetMethods()
            .Where(m => m.Name == name)
            .Select(m => new VisitorInfo(m))
            .Where(m => m.IsValid)
            .ToDictionary(m => m.PartType, m => CreateDelegate(visitor, m.Method)));
 }
 public static void Accept(this IEnumerable <Part> parts, CommonMarkVisitor visitor)
 {
     if (parts != null)
     {
         foreach (var part in parts)
         {
             part.Accept(visitor);
         }
     }
 }