Ejemplo n.º 1
0
        public void GetCombiningClassInfo(int characterCode, int combiningClass)
        {
            var expected = UcdProperty.GetInstance(combiningClass);
            var result   = CustomIcu.GetCombiningClassInfo(characterCode);

            Assert.AreEqual(expected, result);
        }
Ejemplo n.º 2
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Compares two UcdEnumerations
 /// </summary>
 /// <param name="obj">The object to compare with</param>
 /// <returns>
 /// true if the specified <see cref="T:System.Object"></see> is equal to the current
 /// <see cref="T:System.Object"></see>; otherwise, false.
 /// </returns>
 /// ------------------------------------------------------------------------------------
 public override bool Equals(object obj)
 {
     // TODO-Linux: System.Boolean System.Type::op_Inequality(System.Type,System.Type) is
     // marked with a [MonoTODO] attribute and might not work as expected in 4.0
     if (obj.GetType() != this.GetType())
     {
         return(false);
     }
     else
     {
         UcdProperty ucdEnum = (UcdProperty)obj;
         return
             (this.m_description == ucdEnum.m_description &&
              this.m_ucdRepresentation == ucdEnum.m_ucdRepresentation &&
              this.m_ucdCategory == ucdEnum.m_ucdCategory);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets the combining class information of the specified character.
        /// </summary>
        public static UcdProperty GetCombiningClassInfo(int characterCode)
        {
            var normalizer = GetIcuNormalizer(FwNormalizationMode.knmNFC);

            return(UcdProperty.GetInstance(normalizer.GetCombiningClass(characterCode)));
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Gets the bidi class information of the specified character.
 /// </summary>
 public static UcdProperty GetBidiClassInfo(int characterCode)
 {
     return(UcdProperty.GetInstance(Character.CharDirection(characterCode)));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Gets the general category information of the specified character.
 /// </summary>
 public static UcdProperty GetGeneralCategoryInfo(int characterCode)
 {
     return(UcdProperty.GetInstance(Character.GetCharType(characterCode)));
 }
Ejemplo n.º 6
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Gets the numeric type information of the given character.
 /// </summary>
 /// <param name="characterCode">The character code.</param>
 /// ------------------------------------------------------------------------------------
 public static UcdProperty GetNumericTypeInfo(int characterCode)
 {
     return(UcdProperty.GetInstance(Character.GetIntPropertyValue(characterCode, Character.UProperty.NUMERIC_TYPE)));
 }
Ejemplo n.º 7
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Gets the decomposition type information of the given character.
 /// </summary>
 /// <param name="characterCode">The character code.</param>
 /// ------------------------------------------------------------------------------------
 public static UcdProperty GetDecompositionTypeInfo(int characterCode)
 {
     return(UcdProperty.GetInstance(Character.GetIntPropertyValue(characterCode, Character.UProperty.DECOMPOSITION_TYPE)));
 }