public static TStaticObjectModule GetModuleSafe <TStaticObjectModule>(this IStaticObject source) where TStaticObjectModule : IStaticObjectModule { if (source is null) { throw new ArgumentNullException(nameof(source)); } if (!source.HasModule <TStaticObjectModule>()) { return(default);
public static TStaticObjectModule GetModuleSafe <TStaticObjectModule>(this IStaticObject source) where TStaticObjectModule : IStaticObjectModule { if (source is null) { throw new ArgumentNullException(nameof(source)); } if (!source.HasModule <TStaticObjectModule>()) { #pragma warning disable CS8603 // Possible null reference return. return(default);