Esempio n. 1
0
        public NullableType GetNullable(CType pUnderlyingType)
        {
            if (pUnderlyingType is NullableType nt)
            {
                Debug.Fail("Attempt to make nullable of nullable");
                return(nt);
            }

            NullableType pNullableType = _typeTable.LookupNullable(pUnderlyingType);

            if (pNullableType == null)
            {
                Name pName = NameManager.GetPredefinedName(PredefinedName.PN_NUB);

                pNullableType = _typeFactory.CreateNullable(pName, pUnderlyingType, _BSymmgr, this);
                pNullableType.InitFromParent();

                _typeTable.InsertNullable(pUnderlyingType, pNullableType);
            }

            return(pNullableType);
        }