Exemplo n.º 1
0
        public static IntegralTypeInfo Build(
            Type systemType)
        {
            if (!IntegralTypeReference.IsIntegralType(systemType))
            {
                throw new ArgumentException(
                          $"{systemType.Name.SQuote()} is not valid for the argument systemType " +
                          $"for an \'IntegralType\' because it is not an integral type.");
            }

            var valueRange       = buildValueRange(systemType);
            var integralTypeSize = buildTypeSize(systemType);

            return(new IntegralTypeInfo(
                       systemType,
                       valueRange,
                       integralTypeSize));
        }
Exemplo n.º 2
0
 public static bool IsIntegralType(
     this Type @this)
 {
     return(IntegralTypeReference.IsIntegralType(@this));
 }