public static void AllVisit( this Transform self, VisitDelegate action )
 {
     action( self );
     for( int i=0,imax=self.childCount; i<imax; i++ )
     {
         AllVisit( self.GetChild( i ), action );
     }
 }
Example #2
0
 public void Say(Person p, VisitDelegate d)
 {
     if (d is null)
     {
         return;
     }
     Console.WriteLine(new string('-', 20));
     d(p);
     Console.WriteLine(new string('-', 20));
 }
 public MemberVisitor(VisitDelegate visit)
 {
     this.visit = visit;
 }
Example #4
0
 public DelegatedContextVisitor(VisitDelegate aVisitDelegate)
 {
     visitor = aVisitDelegate;
 }
Example #5
0
 public GenericVisitor <TBase> AddDelegate <TSub>(VisitDelegate <TSub> del) where TSub : TBase
 {
     _delegates.Add(typeof(TSub).TypeHandle, del);
     return(this);
 }
Example #6
0
 public DelegateWalker( VisitDelegate visitor, bool visitBranches, TreeWalkerMode mode )
     : base(visitBranches, mode)
 {
     this.visitor = visitor;
 }
Example #7
0
 public DelegateWalker( VisitDelegate visitor, TreeWalkerMode mode )
     : base(false, mode)
 {
     this.visitor = visitor;
 }
Example #8
0
 public DelegateWalker( VisitDelegate visitor )
     : base()
 {
     this.visitor = visitor;
 }