예제 #1
0
        /// <summary>
        /// Gets value indicating the given type is long or double or both but nothing else.
        /// </summary>
        /// <param name="tmask"></param>
        /// <returns></returns>
        protected bool IsNumberOnly(TypeRefMask tmask)
        {
            if (TypeCtx.IsLong(tmask) || TypeCtx.IsDouble(tmask))
            {
                if (tmask.IsSingleType)
                {
                    return(true);
                }

                return(!tmask.IsAnyType && TypeCtx.GetTypes(tmask).AllIsNumber());
            }

            return(false);
        }
예제 #2
0
 /// <summary>
 /// Gets value indicating the given type represents only array types.
 /// </summary>
 protected bool IsArrayOnly(TypeRefMask tmask)
 {
     return(!tmask.IsVoid && !tmask.IsAnyType && TypeCtx.GetTypes(tmask).AllIsArray());
 }
예제 #3
0
 /// <summary>
 /// Gets value indicating the given type represents only class types.
 /// </summary>
 protected bool IsClassOnly(TypeRefMask tmask)
 {
     return(!tmask.IsVoid && !tmask.IsAnyType && TypeCtx.GetTypes(tmask).AllIsObject());
 }