IsNullableConstructor() public method

public IsNullableConstructor ( ) : bool
return bool
Esempio n. 1
0
        private static bool IsNullableConstructor(Expr expr, out ExprCall call)
        {
            Debug.Assert(expr != null);

            if (expr is ExprCall pCall && pCall.MemberGroup.OptionalObject == null)
            {
                MethodSymbol meth = pCall.MethWithInst.Meth();
                if (meth != null && meth.IsNullableConstructor())
                {
                    call = pCall;
                    return(true);
                }
            }

            call = null;
            return(false);
        }
Esempio n. 2
0
        public static bool IsNullableConstructor(EXPR expr)
        {
            Debug.Assert(expr != null);

            if (!expr.isCALL())
            {
                return(false);
            }

            EXPRCALL pCall = expr.asCALL();

            if (pCall.GetMemberGroup().GetOptionalObject() != null)
            {
                return(false);
            }

            MethodSymbol meth = pCall.mwi.Meth();

            if (meth == null)
            {
                return(false);
            }
            return(meth.IsNullableConstructor());
        }
Esempio n. 3
0
        private static bool IsNullableConstructor(Expr expr)
        {
            Debug.Assert(expr != null);

            if (!expr.isCALL())
            {
                return(false);
            }

            ExprCall pCall = expr.asCALL();

            if (pCall.MemberGroup.OptionalObject != null)
            {
                return(false);
            }

            MethodSymbol meth = pCall.MethWithInst.Meth();

            if (meth == null)
            {
                return(false);
            }
            return(meth.IsNullableConstructor());
        }