// these methods call the worker methods in TreeTransform. They are only
 // here because their names and parameters are generated differently
 public override void ExitEntity([NotNull] XP.EntityContext context)
 {
     if (context.GetChild(0) is XP.XppclassContext)
     {
         // classes are handled separately because we need to add the external methods to their members
         // so suppress call to base implementation. We will bind them later from ExitSource by calling bindClasses
         return;
     }
     base.ExitEntity(context);
 }
Exemplo n.º 2
0
 private static void processType(XP.EntityContext xnode,
                                 Dictionary <string, List <PartialPropertyElement> > partialClasses,
                                 IEnumerable <Syntax.UsingDirectiveSyntax> usings
                                 )
 {
     if (xnode != null && xnode.ChildCount == 1)
     {
         var cls = xnode.GetChild(0) as XP.IPartialPropertyContext;
         if (cls != null && (cls.Data.Partial || cls.Data.PartialProps))
         {
             var name = cls.Name;
             if (!partialClasses.ContainsKey(name))
             {
                 partialClasses.Add(name, new List <PartialPropertyElement>());
             }
             partialClasses[name].Add(new PartialPropertyElement(cls, usings));
         }
     }
 }