예제 #1
0
 internal static string GetGenericName(TypeReference genericDefinition, string leftBracket, string rightBracket, ILanguage language)
 {
     V_0 = genericDefinition.get_Name();
     if (!genericDefinition.get_HasGenericParameters())
     {
         if (!genericDefinition.get_IsPointer() && !genericDefinition.get_IsByReference() && !genericDefinition.get_IsArray())
         {
             V_0 = GenericHelper.ReplaceInvalidCharactersName(language, V_0);
         }
     }
     else
     {
         V_0 = GenericHelper.GetNonGenericName(genericDefinition.get_Name());
         if (!genericDefinition.get_IsPointer() && !genericDefinition.get_IsByReference() && !genericDefinition.get_IsArray())
         {
             V_0 = GenericHelper.ReplaceInvalidCharactersName(language, V_0);
         }
         if (language != null && String.op_Equality(language.get_Name(), "IL"))
         {
             V_1 = genericDefinition.get_GenericParameters().get_Count();
             V_0 = String.Concat(V_0, "`", V_1.ToString());
             return(V_0);
         }
         V_0 = String.Concat(V_0, leftBracket);
         V_2 = 0;
         while (V_2 < genericDefinition.get_GenericParameters().get_Count())
         {
             V_3 = genericDefinition.get_GenericParameters().get_Item(V_2);
             if (V_3.get_IsCovariant())
             {
                 V_0 = String.Concat(V_0, "out ");
             }
             if (V_3.get_IsContravariant())
             {
                 V_0 = String.Concat(V_0, "in ");
             }
             V_0 = String.Concat(V_0, GenericHelper.ReplaceInvalidCharactersName(language, V_3.get_Name()));
             if (V_2 != genericDefinition.get_GenericParameters().get_Count() - 1)
             {
                 V_0 = String.Concat(V_0, ", ");
             }
             V_2 = V_2 + 1;
         }
         V_0 = String.Concat(V_0, rightBracket);
     }
     return(V_0);
 }