| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -290,11 +290,13 @@ internal static void InitClassBase(Type type, ClassBase impl, ReflectedClrType p | |||
| 290 | 290 | ||
| 291 | 291 | internal static bool ShouldBindMethod(MethodBase mb) | |
| 292 | 292 | { | |
| 293 | + if (mb is null) throw new ArgumentNullException(nameof(mb)); | ||
| 293 | 294 | return (mb.IsPublic || mb.IsFamily || mb.IsFamilyOrAssembly); | |
| 294 | 295 | } | |
| 295 | 296 | ||
| 296 | 297 | internal static bool ShouldBindField(FieldInfo fi) | |
| 297 | 298 | { | |
| 299 | + if (fi is null) throw new ArgumentNullException(nameof(fi)); | ||
| 298 | 300 | return (fi.IsPublic || fi.IsFamily || fi.IsFamilyOrAssembly); | |
| 299 | 301 | } | |
| 300 | 302 | ||
@@ -326,7 +328,7 @@ internal static bool ShouldBindProperty(PropertyInfo pi) | |||
| 326 | 328 | ||
| 327 | 329 | internal static bool ShouldBindEvent(EventInfo ei) | |
| 328 | 330 | { | |
| 329 | - return ShouldBindMethod(ei.GetAddMethod(true)); | ||
| 331 | + return ei.GetAddMethod(true) is { } add && ShouldBindMethod(add); | ||
| 330 | 332 | } | |
| 331 | 333 | ||
| 332 | 334 | private static ClassInfo GetClassInfo(Type type, ClassBase impl) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments