Swagger.Net.XmlCommentDocumentationProvider.GetGenericResponseClass C# (CSharp) 메소드

GetGenericResponseClass() 개인적인 정적인 메소드

private static GetGenericResponseClass ( MethodInfo methodInfo ) : string
methodInfo System.Reflection.MethodInfo
리턴 string
        private static string GetGenericResponseClass(MethodInfo methodInfo)
        {
            if (methodInfo.ReturnParameter == null) return methodInfo.ReturnType.Name;
            
            var paramType = methodInfo.ReturnParameter.ParameterType;
            var argNames = string.Join(",", paramType.GetGenericArguments().Select(arg => arg.Name));
            
            var rtn = string.Format("{0}<{1}>", paramType.Name, string.Join(",", argNames));

            return rtn.Replace("`1", "");
        }