Exemple #1
0
        /// <summary>
        /// This is used to visit a list of types
        /// </summary>
        /// <param name="types">The list of types to visit</param>
        protected virtual void VisitTypes(TypeNodeList types)
        {
            // Visit the types in sorted order
            foreach (TypeNode type in types.OrderBy(t => t.FullName))
            {
                if (filter.IsExposedType(type) || filter.HasExposedMembers(type))
                {
                    this.VisitType(type);
                }

                if (this.Canceled)
                {
                    break;
                }
            }
        }
Exemple #2
0
 protected virtual void VisitTypes(TypeNodeList types)
 {
     // sort types by name
     TypeNode[] sorted_types = new TypeNode[types.Count];
     for (int i = 0; i < types.Count; i++)
     {
         sorted_types[i] = types[i];
     }
     Array.Sort <TypeNode>(sorted_types, typeComparison);
     // visit them
     foreach (TypeNode type in sorted_types)
     {
         //Console.WriteLine("visiting {0}", type.Name);
         //visit this type if it is exposed, or has members that are set as exposed
         if (filter.IsExposedType(type) || filter.HasExposedMembers(type))
         {
             VisitType(type); //visit type and members
         }
     }
 }