/// <seealso cref="Transliterator.AddSourceTargetSet(UnicodeSet, UnicodeSet, UnicodeSet)"/> #pragma warning disable 672 public override void AddSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) #pragma warning restore 672 { SourceTargetUtility cache = SOURCE_CACHE.GetOrAdd(norm2, (norm2) => new SourceTargetUtility(new NormalizingTransform(norm2), norm2)); cache.AddSourceTargetSet(this, inputFilter, sourceSet, targetSet); }
/// <seealso cref="Transliterator.AddSourceTargetSet(UnicodeSet, UnicodeSet, UnicodeSet)"/>. public override void AddSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) { lock (this) { if (sourceTargetUtility == null) { sourceTargetUtility = new SourceTargetUtility(new StringTransform(transform: (source) => { return(UCharacter.ToLower(locale, source)); })); } } sourceTargetUtility.AddSourceTargetSet(this, inputFilter, sourceSet, targetSet); }
/// <seealso cref="Transliterator.AddSourceTargetSet(UnicodeSet, UnicodeSet, UnicodeSet)"/> public override void AddSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) { lock (typeof(UppercaseTransliterator)) { if (sourceTargetUtility == null) { sourceTargetUtility = new SourceTargetUtility(new StringTransform(transform: (source) => { return(UCharacter.FoldCase(source, true)); })); } } sourceTargetUtility.AddSourceTargetSet(this, inputFilter, sourceSet, targetSet); }
/// <seealso cref="Transliterator.AddSourceTargetSet(UnicodeSet, UnicodeSet, UnicodeSet)"/> #pragma warning disable 672 public override void AddSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) #pragma warning restore 672 { lock (this) { if (sourceTargetUtility == null) { sourceTargetUtility = new SourceTargetUtility(new StringTransform(transform: (source) => { return(UChar.ToTitleCase(locale, source, null)); })); } } sourceTargetUtility.AddSourceTargetSet(this, inputFilter, sourceSet, targetSet); }
/// <seealso cref="Transliterator.AddSourceTargetSet(UnicodeSet, UnicodeSet, UnicodeSet)"/> public override void AddSourceTargetSet(UnicodeSet inputFilter, UnicodeSet sourceSet, UnicodeSet targetSet) { SourceTargetUtility cache; lock (SOURCE_CACHE) { //String id = getID(); cache = SOURCE_CACHE.Get(norm2); if (cache == null) { cache = new SourceTargetUtility(new NormalizingTransform(norm2), norm2); SOURCE_CACHE[norm2] = cache; } } cache.AddSourceTargetSet(this, inputFilter, sourceSet, targetSet); }