/// <summary> /// Builds the types. /// </summary> /// <param name="baseType">Type of the base.</param> /// <param name="seen">The seen.</param> /// <param name="result">The result.</param> /// <returns></returns> private bool BuildTypes(Type baseType, ISet <Type> seen, ISet <Type> result) { if (seen.Contains(baseType)) { return(false); } seen.Add(baseType); if (!this.AnalyseType(baseType, seen, result)) { return(false); } var enumerator = new ComplexPropertyMemberTypeEnumerator(baseType, BindingFlags.Instance | BindingFlags.Public); if (!enumerator.IsConsidered) { return(false); } result.Add(baseType); var retval = false; while (enumerator.MoveNext()) { var type = enumerator.Current; retval = this.BuildTypes(type, seen, result) || retval; } return(retval); }
/// <summary> /// Builds the types. /// </summary> /// <param name="baseType">Type of the base.</param> /// <param name="seen">The seen.</param> /// <param name="result">The result.</param> /// <returns></returns> private bool BuildTypes(Type baseType, ISet<Type> seen, ISet<Type> result) { if (seen.Contains(baseType)) return false; seen.Add(baseType); if (!this.AnalyseType(baseType, seen, result)) return false; var enumerator = new ComplexPropertyMemberTypeEnumerator(baseType, BindingFlags.Instance | BindingFlags.Public); if (!enumerator.IsConsidered) return false; result.Add(baseType); var retval = false; while (enumerator.MoveNext()) { var type = enumerator.Current; retval = this.BuildTypes(type, seen, result) || retval; } return retval; }
/// <summary> /// Determines whether [is considered type] [the specified type]. /// </summary> /// <param name="type">The type.</param> /// <returns> /// <c>true</c> if [is considered type] [the specified type]; otherwise, <c>false</c>. /// </returns> protected override bool IsConsideredType(Type type) { return(!ComplexPropertyMemberTypeEnumerator.IsBuiltinType(type) && base.IsConsideredType(type)); }