private static string GetFriendlyFullGenericInstanceTypeName(this GenericInstanceType self, ILanguage language)
 {
     V_0       = new StringBuilder();
     dummyVar0 = V_0.Append(self.GetFriendlyFullTypeSpecificationName(language));
     V_1       = V_0.ToString().LastIndexOf('<');
     if (V_1 >= 0 && V_1 < V_0.get_Length())
     {
         dummyVar1 = V_0.Remove(V_1, V_0.get_Length() - V_1);
         self.GenericInstanceFriendlyFullName(language, V_0, false, "<", ">");
         V_2 = 0;
         V_3 = 0;
         while (V_3 < V_0.get_Length())
         {
             if (V_0.get_Chars(V_3) != '<')
             {
                 if (V_0.get_Chars(V_3) == '>')
                 {
                     V_2 = V_2 - 1;
                 }
             }
             else
             {
                 V_2 = V_2 + 1;
             }
             V_3 = V_3 + 1;
         }
         if (V_2 > 0)
         {
             dummyVar2 = V_0.Append(new String('>', V_2));
         }
     }
     return(V_0.ToString());
 }
Ejemplo n.º 2
0
        private static string GetFriendlyFullGenericInstanceTypeName(this GenericInstanceType self, ILanguage language)
        {
            StringBuilder name = new StringBuilder();

            name.Append(self.GetFriendlyFullTypeSpecificationName(language));
            int indexOfBracket = name.ToString().LastIndexOf('<');

            indexOfBracket = self.FullName.LastIndexOf('<');
            if (indexOfBracket >= 0 && indexOfBracket < name.Length)
            {
                name.Remove(indexOfBracket, name.Length - indexOfBracket);
                self.GenericInstanceFriendlyFullName(language, name, false, "<", ">");

                int count = 0;
                for (int i = 0; i < name.Length; i++)
                {
                    if (name[i] == '<')
                    {
                        count++;
                        continue;
                    }
                    if (name[i] == '>')
                    {
                        count--;
                        continue;
                    }
                }
                if (count > 0)
                {
                    name.Append(new string('>', count));
                }
            }
            return(name.ToString());
        }