Exemple #1
0
        private static IEnumerable <TypeDefinition> GetTypes(Collection <TypeDefinition> types)
        {
            for (int i = 0; i < types.Count; i++)
            {
                TypeDefinition typeDefinition = types[i];
                yield return(typeDefinition);

                if (typeDefinition.HasNestedTypes)
                {
                    foreach (TypeDefinition current in ModuleDefinition.GetTypes(typeDefinition.NestedTypes))
                    {
                        yield return(current);
                    }
                }
            }
            yield break;
        }
Exemple #2
0
 public IEnumerable <TypeDefinition> GetTypes()
 {
     return(ModuleDefinition.GetTypes(this.Types));
 }