private static void ValidateCodeDirective(CodeDirective e) {
if (e is CodeChecksumPragma)
ValidateChecksumPragma((CodeChecksumPragma) e);
else if (e is CodeRegionDirective)
ValidateRegionDirective((CodeRegionDirective) e);
else
throw new ArgumentException(SR.GetString(SR.InvalidElementType, e.GetType().FullName), "e");
}