Microsoft.CSharp.RuntimeBinder.Semantics.MethodSymbol.IsNullableConstructor C# (CSharp) Méthode

IsNullableConstructor() public méthode

public IsNullableConstructor ( ) : bool
Résultat bool
        public bool IsNullableConstructor()
        {
            return getClass().isPredefAgg(PredefinedType.PT_G_OPTIONAL) &&
                Params.Size == 1 &&
                Params.Item(0).IsGenericParameter &&
                IsConstructor();
        }

Usage Example

Exemple #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);
        }
All Usage Examples Of Microsoft.CSharp.RuntimeBinder.Semantics.MethodSymbol::IsNullableConstructor