Пример #1
0
 // no space between the dot operator
 public void DotNormalizer(List<string> lis){
   Layers lay = new Layers();
   List<string> li = new List<string>();
   foreach (string line in lis){
     if (line.Contains(".") && !line.Contains("using")){
       int i = line.IndexOf(".");
       if (line[i - 1] == ' ' && line[i + 1] == ' '){
         string g = line.Replace(" . ", ".");
         li.Add(g);
       } else if ((line[i - 1] == ' ' && line[i + 1] != ' ') || (line[i - 1] != ' ' && line[i + 1] == ' ')){
         int j = line.IndexOf(".");
         if (line[i + 1] == ' '){
           string g = line.Replace(". ", ".");
           li.Add(g);
         } else {
           string g = line.Replace(" .", ".");
           li.Add(g);
         }
         li.Add(line);
       } else {
         li.Add(line);
       }
     } else {
       li.Add(line);
     }
   }
   lay.ParanthesisNormalizer(li);
 }