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);
Ejemplo n.º 2
0
        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);