Ejemplo n.º 1
0
        private static ITypeParameterName ToAnonymousTypeParameter(ITypeParameterName typeParameter,
                                                                   bool anonymizeShortNames)
        {
            var l = anonymizeShortNames
                ? typeParameter.TypeParameterShortName.ToHash()
                : typeParameter.TypeParameterShortName;

            if (!typeParameter.IsBound)
            {
                return(Names.TypeParameter(l));
            }

            string r;

            if (typeParameter.TypeParameterType.IsTypeParameter &&
                !typeParameter.TypeParameterType.AsTypeParameterName.IsBound)
            {
                r = typeParameter.TypeParameterType.AsTypeParameterName.TypeParameterShortName.ToHash();
            }
            else
            {
                r = typeParameter.TypeParameterType.ToAnonymousName().Identifier;
            }

            return(Names.TypeParameter(l, r));
        }
Ejemplo n.º 2
0
 private static ITypeParameterName ToAnonymousType_TypeParameter(ITypeParameterName typeParameter)
 {
     return(ToAnonymousTypeParameter(typeParameter, false));
 }