void AddFoldDocs(CodeTypeDeclaration type, CodeMemberMethod method, int n) { method.Comments.AddDocs( XmlDocs.TypeParam("TResult", " The type to convert the " + XmlDocs.See(DefaultNamespace, type) + " to." ), GetFoldParametersDocs(type, n), XmlDocs.Summary( " Converts a " + XmlDocs.See(DefaultNamespace, type) + " into a <typeparamref name=\"TResult\" /> value." ), XmlDocs.Returns( " A <typeparamref name=\"TResult\" /> as generated by one", " of the conversion delegate parameters." ), XmlDocs.Remarks( " <para>", " Converts a " + XmlDocs.See(DefaultNamespace, type) + " into a <typeparamref name=\"TResult\" />", " by invoking one of the provided delegate parameters.", " </para>", " <para>", " The parameter which is invoked is predicated upon the internal position of", " the value held. For example, if the internal value is in the first position ", " (i.e. " + XmlDocs.See(DefaultNamespace, type, type.GetMethods(A(0)).First()), " was used to create the " + XmlDocs.See(DefaultNamespace, type) + " instance), then", " <paramref name=\"a\" /> (the first delegate parameter) will be invoked to", " convert the <typeparamref name=\"T1\" /> into a ", " <typeparamref name=\"TResult\" />.", " </para>" ), XmlDocs.ArgumentNullException(Enumerable.Range(0, n).Select(v => a(v))) ); }