public static bool IsCompilerGeneratedOrIsInCompilerGeneratedClass(this IMemberDef member) { if (member == null) { return(false); } if (member.IsCompilerGenerated()) { return(true); } return(IsCompilerGeneratedOrIsInCompilerGeneratedClass(member.DeclaringType)); }
public static bool IsCompilerGeneratedOrIsInCompilerGeneratedClass(this IMemberDef member) { for (int i = 0; i < 50; i++) { if (member == null) { break; } if (member.IsCompilerGenerated()) { return(true); } member = member.DeclaringType; } return(false); }