Pchp.CodeAnalysis.FlowAnalysis.TypeRefContext.GetNullTypeMask C# (CSharp) 메소드

GetNullTypeMask() 공개 메소드

Gets type mask corresponding to System.Object and not including any subclasses.
public GetNullTypeMask ( ) : TypeRefMask
리턴 TypeRefMask
        public TypeRefMask GetNullTypeMask()
        {
            return GetTypeMask(NameUtils.SpecialNames.System_Object, false);
        }

Usage Example

예제 #1
0
        /// <summary>
        /// Gets type mask of the literal within given type context.
        /// </summary>
        internal TypeRefMask ResolveTypeMask(TypeRefContext typeCtx)
        {
            Debug.Assert(this.ConstantValue.HasValue);
            var value = this.ConstantValue.Value;

            if (value == null)
            {
                return typeCtx.GetNullTypeMask();
            }
            else
            {
                if (value is long || value is int)
                {
                    return typeCtx.GetLongTypeMask();
                }
                else if (value is string)
                {
                    return typeCtx.GetStringTypeMask();
                }
                else if (value is bool)
                {
                    return typeCtx.GetBooleanTypeMask();
                }
                else if (value is double)
                {
                    return typeCtx.GetDoubleTypeMask();
                }
                else
                {
                    throw new NotImplementedException();
                }
            }
        }
All Usage Examples Of Pchp.CodeAnalysis.FlowAnalysis.TypeRefContext::GetNullTypeMask