Esempio n. 1
0
        /// <summary>
        /// Creates a new instance of <see cref="StaticVisitor"/>
        /// </summary>
        /// <param name="collection">The collection to which visit stacks will be added</param>
        /// <param name="configuration">The custom configuration which defines the visitor behaviour</param>
        public StaticVisitor(out System.Collections.Generic.IList <System.Collections.Generic.Stack <TypeVisit> > visits, StaticVisitorConfiguration configuration)
        {
            visits = new System.Collections.Generic.List <System.Collections.Generic.Stack <TypeVisit> >();
            var listClosure = visits;

            Action             = stack => listClosure.Add(stack.Clone());
            this.configuration = configuration;
        }
Esempio n. 2
0
 /// <summary>
 /// Creates a new instance of <see cref="StaticVisitor"/>
 /// </summary>
 /// <param name="action">The action to be invoked when a stack is visited</param>
 /// <param name="configuration">The custom configuration which defines the visitor behaviour</param>
 public StaticVisitor(Action <System.Collections.Generic.Stack <TypeVisit> > action, StaticVisitorConfiguration configuration)
 {
     Action             = action;
     this.configuration = configuration;
 }
Esempio n. 3
0
 /// <summary>
 /// Creates a new instance of <see cref="StaticVisitor"/>
 /// </summary>
 /// <param name="collection">The collection to which visit stacks will be added. Use an ordered collection to preserve order of visit</param>
 /// <param name="configuration">The custom configuration which defines the visitor behaviour</param>
 public StaticVisitor(System.Collections.Generic.ICollection <System.Collections.Generic.Stack <TypeVisit> > visits, StaticVisitorConfiguration configuration)
 {
     Action             = x => visits.Add(x.Clone());
     this.configuration = configuration;
 }
Esempio n. 4
0
 /// <summary>
 /// Creates a new instance of <see cref="StaticVisitor"/>
 /// </summary>
 /// <param name="action">The action to be invoked when a stack is visited</param>
 public StaticVisitor(Action <System.Collections.Generic.Stack <TypeVisit> > action)
 {
     Action        = action;
     configuration = new StaticVisitorConfiguration();
 }
Esempio n. 5
0
 /// <summary>
 /// Creates a new instance of <see cref="StaticVisitor"/>
 /// </summary>
 /// <param name="collection">The collection to which visit stacks will be added. Use an ordered collection to preserve order of visit</param>
 public StaticVisitor(System.Collections.Generic.ICollection <System.Collections.Generic.Stack <TypeVisit> > visits)
 {
     Action        = x => visits.Add(x.Clone());
     configuration = new StaticVisitorConfiguration();
 }