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 );
     }
 }
示例#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;
 }
示例#4
0
 public DelegatedContextVisitor(VisitDelegate aVisitDelegate)
 {
     visitor = aVisitDelegate;
 }
示例#5
0
 public GenericVisitor <TBase> AddDelegate <TSub>(VisitDelegate <TSub> del) where TSub : TBase
 {
     _delegates.Add(typeof(TSub).TypeHandle, del);
     return(this);
 }
示例#6
0
 public DelegateWalker( VisitDelegate visitor, bool visitBranches, TreeWalkerMode mode )
     : base(visitBranches, mode)
 {
     this.visitor = visitor;
 }
示例#7
0
 public DelegateWalker( VisitDelegate visitor, TreeWalkerMode mode )
     : base(false, mode)
 {
     this.visitor = visitor;
 }
示例#8
0
 public DelegateWalker( VisitDelegate visitor )
     : base()
 {
     this.visitor = visitor;
 }