Mono.CSharp.TypeManager.IsGenericParameter C# (CSharp) Method

IsGenericParameter() public static method

public static IsGenericParameter ( System.TypeSpec type ) : bool
type System.TypeSpec
return bool
	public static bool IsGenericParameter (TypeSpec type)
	{
		return type.IsGenericParameter;
	}

Usage Example

Example #1
0
File: doc.cs Project: mdae/MonoRT
        static string GetSignatureForDoc(Type type)
        {
#if GMCS_SOURCE
            if (TypeManager.IsGenericParameter(type))
            {
                return((type.DeclaringMethod != null ? "``" : "`") + TypeManager.GenericParameterPosition(type));
            }

            if (TypeManager.IsGenericType(type))
            {
                string g = type.Namespace;
                if (g != null && g.Length > 0)
                {
                    g += '.';
                }
                int idx = type.Name.LastIndexOf('`');
                g += (idx < 0 ? type.Name : type.Name.Substring(0, idx)) + '{';
                int argpos = 0;
                foreach (Type t in type.GetGenericArguments())
                {
                    g += (argpos++ > 0 ? "," : String.Empty) + GetSignatureForDoc(t);
                }
                g += '}';
                return(g);
            }
#endif

            string name = type.FullName != null ? type.FullName : type.Name;
            return(name.Replace("+", ".").Replace('&', '@'));
        }
All Usage Examples Of Mono.CSharp.TypeManager::IsGenericParameter