コード例 #1
0
        private static async Task TypeParameters(StreamWriter writer, MethodInfo method, XDocument xmlComments)
        {
            if (method.IsGenericMethod)
            {
                var genericArguments = method.GetGenericArguments();

                await writer.WriteLineAsync("### Type Parameters");

                foreach (var genericArgument in genericArguments)
                {
                    await writer.WriteAsync("**`");

                    await writer.WriteAsync(genericArgument.Name);

                    await writer.WriteLineAsync("`**  ");

                    await writer.WriteLineAsync(XmlCommentHelper.TypeParameter(xmlComments, method, genericArgument));

                    await writer.WriteLineAsync();
                }
            }
        }