/// ------------------------------------------------------------------------------------ /// <summary> /// Gets an enumeration associated with the given General Category /// </summary> /// <param name="generalCategory">The UCD general category /// see: http://www.unicode.org/Public/UNIDATA/UCD.html#General_Category_Values</param> /// <returns> /// Returns the only instance that matches the requested value. /// Thus two calls will get the same instance. /// </returns> /// ------------------------------------------------------------------------------------ public static UcdProperty GetInstance(Icu.UCharCategory generalCategory) { InitializeHashTables(); Dictionary <int, UcdProperty> propertyHash = s_ucdPropertyDict[UcdCategories.generalCategory]; return(propertyHash[(int)generalCategory]); }
public void CharacterPropertyOverrides() { Icu.InitIcuDataDir(); Icu.UCharCategory result = Icu.GetCharType('\xF171'); Assert.That(result, Is.EqualTo(Icu.UCharCategory.U_NON_SPACING_MARK)); }