Beispiel #1
0
        /// <summary>
        /// Gets all types references in this type.
        /// This includes the element type and any generic arguments.
        /// </summary>
        public override IEnumerable <NetTypeDefinition> GetReferencedTypes()
        {
            yield return(elementType);

            if (declaringType != null)
            {
                foreach (var type in declaringType.GetReferencedTypes())
                {
                    yield return(type);
                }
            }
            foreach (var type in genericArguments.SelectMany(x => x.GetReferencedTypes()))
            {
                yield return(type);
            }
        }
Beispiel #2
0
 /// <summary>
 /// Gets all types references in this type.
 /// This includes the element type and any generic arguments.
 /// </summary>
 public override IEnumerable <NetTypeDefinition> GetReferencedTypes()
 {
     return(elementType.GetReferencedTypes());
 }