Esempio n. 1
0
        public void Process(ProcessedAssembly a)
        {
            if (!a.UserCode)
            {
                return;
            }

            foreach (var t in GetTypes(a.Assembly))
            {
                var pt = new ProcessedType(t)
                {
                    Assembly = a,
                };
                Types.Add(pt);

                foreach (var nt in t.GetNestedTypes())
                {
                    var pnt = new ProcessedType(nt)
                    {
                        Assembly = a
                    };
                    Types.Add(pnt);
                }
            }

            // we can add new types while processing some (e.g. categories)
            foreach (var type in Types)
            {
                typeQueue.Enqueue(type);
            }
            Types.Clear();              // reuse
            while (typeQueue.Count > 0)
            {
                Process(typeQueue.Dequeue());
            }
        }
Esempio n. 2
0
 protected void AddExtraType(ProcessedType pt)
 {
     typeQueue.Enqueue(pt);
     // extra types are (most likely) outside the input list of assemblies
     AddIfUnique(pt.Assembly);
 }
Esempio n. 3
0
 public abstract void Process(ProcessedType pt);
 protected abstract void Generate(ProcessedType t);