GetGenericArguments() public method

public GetGenericArguments ( ) : SDKDocGenerator.TypeWrapper[]
return SDKDocGenerator.TypeWrapper[]
Esempio n. 1
0
        public static string DetermineNDocNameLookupSignature(MethodInfoWrapper info)
        {
            var type     = info.DeclaringType;
            var fullName = type.FullName ?? type.Namespace + "." + type.Name;
            var typeGenericParameters = type.GetGenericArguments();
            var parameters            = new StringBuilder();

            foreach (var param in info.GetParameters())
            {
                if (parameters.Length > 0)
                {
                    parameters.Append(",");
                }
                DetermineParameterName(param.ParameterType, parameters, typeGenericParameters);
                if (param.IsOut)
                {
                    parameters.Append("@");
                }
            }

            var genericTag = "";

            if (info.IsGenericMethod)
            {
                genericTag = "``" + info.GetGenericArguments().Length;
            }

            var signature = parameters.Length > 0
                ? string.Format("M:{0}.{1}{2}({3})", fullName, info.Name, genericTag, parameters)
                : string.Format("M:{0}.{1}{2}", fullName, info.Name, genericTag);

            return(signature);
        }
Esempio n. 2
0
        public static string DetermineNDocNameLookupSignature(MethodInfoWrapper info)
        {
            var type = info.DeclaringType;
            var parameters = new StringBuilder();
            foreach (var param in info.GetParameters())
            {
                if (parameters.Length > 0)
                    parameters.Append(",");
                DetermineParameterName(param.ParameterType, parameters);
                if (param.IsOut)
                {
                    parameters.Append("@");
                }
            }

            var genericTag = "";
            if (info.IsGenericMethod)
            {
                genericTag = "``" + info.GetGenericArguments().Length;
            }

            var signature = parameters.Length > 0
                ? string.Format("M:{0}.{1}{2}({3})", type.FullName, info.Name, genericTag, parameters)
                : string.Format("M:{0}.{1}{2}", type.FullName, info.Name, genericTag);

            return signature;
        }