Esempio n. 1
0
        public virtual void AddSourceTargetSet(Transliterator transliterator, UnicodeSet inputFilter, UnicodeSet sourceSet,
                                               UnicodeSet targetSet)
        {
#pragma warning disable 612, 618
            UnicodeSet myFilter = transliterator.GetFilterAsUnicodeSet(inputFilter);
#pragma warning restore 612, 618
            UnicodeSet affectedCharacters = new UnicodeSet(sourceCache).RetainAll(myFilter);
            sourceSet.AddAll(affectedCharacters);
            foreach (string s in affectedCharacters)
            {
                targetSet.AddAll(transform.Transform(s));
            }
            foreach (string s in sourceStrings)
            {
                if (myFilter.ContainsAll(s))
                {
                    string t = transform.Transform(s);
                    if (!s.Equals(t))
                    {
                        targetSet.AddAll(t);
                        sourceSet.AddAll(s);
                    }
                }
            }
        }