public bool IsConditionallyExcluded (IMemberContext ctx)
{
if ((Kind & (MemberKind.Class | MemberKind.Method)) == 0)
return false;
var conditions = MemberDefinition.ConditionalConditions ();
if (conditions == null)
return false;
var m = ctx.CurrentMemberDefinition;
CompilationSourceFile unit = null;
while (m != null && unit == null) {
unit = m as CompilationSourceFile;
m = m.Parent;
}
if (unit != null) {
foreach (var condition in conditions) {
if (unit.IsConditionalDefined (condition))
return false;
}
}
return true;
}