private static void AddLineBreakClassRange(Dictionary <int, UnicodeDataItem> codepoints, CodepointRange range,
                                            int lineBreakClass)
 {
     for (var i = range.Start; i <= range.End; i++)
     {
         if (!codepoints.ContainsKey(i))
         {
             codepoints.Add(i, new UnicodeDataItem {
                 Codepoint = i, LineBreakClass = lineBreakClass
             });
         }
         else
         {
             codepoints[i].LineBreakClass = lineBreakClass;
         }
     }
 }
 private static void AddScriptRange(Dictionary <int, UnicodeDataItem> codepoints, CodepointRange range,
                                    int script)
 {
     for (var i = range.Start; i <= range.End; i++)
     {
         if (!codepoints.ContainsKey(i))
         {
             codepoints.Add(i, new UnicodeDataItem {
                 Codepoint = i, Script = script
             });
         }
         else
         {
             codepoints[i].Script = script;
         }
     }
 }
Exemplo n.º 3
0
        private static void AddBiDiBracket(Dictionary <int, BiDiDataItem> codepoints, CodepointRange range,
                                           int bracketType)
        {
            if (!codepoints.ContainsKey(range.Start))
            {
                codepoints.Add(range.Start,
                               new BiDiDataItem {
                    Codepoint = range.Start, Bracket = range.End, BracketType = bracketType
                });
            }
            else
            {
                var codepoint = codepoints[range.Start];

                codepoint.Bracket     = range.End;
                codepoint.BracketType = bracketType;
            }
        }
 private static void AddGeneralCategoryRange(Dictionary <int, UnicodeDataItem> codepoints, CodepointRange range,
                                             int generalCategory)
 {
     for (var i = range.Start; i <= range.End; i++)
     {
         if (!codepoints.ContainsKey(i))
         {
             codepoints.Add(i, new UnicodeDataItem {
                 Codepoint = i, GeneralCategory = generalCategory
             });
         }
         else
         {
             codepoints[i].GeneralCategory = generalCategory;
         }
     }
 }
Exemplo n.º 5
0
 private static void AddBiDiClassRange(Dictionary <int, BiDiDataItem> codepoints, CodepointRange range,
                                       int biDiClass)
 {
     for (var i = range.Start; i <= range.End; i++)
     {
         if (!codepoints.ContainsKey(i))
         {
             codepoints.Add(i, new BiDiDataItem {
                 Codepoint = i, BiDiClass = biDiClass
             });
         }
         else
         {
             codepoints[i].BiDiClass = biDiClass;
         }
     }
 }