vb.net – 是否有“特殊”方法通过XML注释识别IntelliSense中方
发布时间:2020-12-17 07:28:00 所属栏目:百科 来源:网络整理
导读:通常,我有一系列重载方法,所有方法都汇集到一个“主”方法中.每个重载接受不同的参数组合,然后将这些值传递给“master”以及一些未包含在重载版本中的任何“默认”值.我正在尝试为这些方法创建 XML文档,我想以一些明显的方式指出这些默认值是什么. 是否有一
通常,我有一系列重载方法,所有方法都汇集到一个“主”方法中.每个重载接受不同的参数组合,然后将这些值传递给“master”以及一些未包含在重载版本中的任何“默认”值.我正在尝试为这些方法创建
XML文档,我想以一些明显的方式指出这些默认值是什么.
是否有一个特定的XML标记可以被这种形式的文档用于识别将传递给另一个方法的默认值?理想情况下,我希望在IntelliSense中看到类似Default的内容:< parametername>值< defaultvalue>,尽管在XML文档功能的标准行为中可能要求一点点. 如果没有“特殊”XML标签用于类似的东西,我想我只需要在< summary>中提出一些适当的措辞.或<备注>部分. “这将使用< defaultvalue>的默认值为< parametername> …”的效果.我只是认为如果有办法识别这些默认值以及其他参数会更好看. 显然,这不是一个关键需求.我只是好奇这一点,想知道我是否只是忽略了一些东西.以下是相关代码的示例.我已经删除了主方法中的实际操作代码,因为它与此问题无关,但如果有人需要/想要它,我会指出它. “大师”方法 ''' <summary> ''' Merges multiple PDF files into a single PDF file ''' </summary> ''' <param name="PDFFiles">A list of specific PDF files to merge</param> ''' <param name="OutputFileName">The PDF file to create from the merged PDF files</param> ''' <param name="OverwriteExistingPDF">If the specified PDF file already exists,identifies whether or not to overwrite the existing file</param> ''' <param name="SortOrder">Identifies the order in which to add the source PDF files to the output file</param> ''' <returns>A FileInfo object representing the merged PDF if successful. <cref>Nothing</cref> if unsuccessful.</returns> ''' <remarks>Using the <see cref="iTextSharp.text.pdf.PdfCopy"/> (<paramref name="UseSmartMerge"/> = <c>False</c>) may result in larger files,''' while using the <see cref="iTextSharp.text.pdf.PdfSmartCopy"/> (<paramref name="UseSmartMerge"/> = <c>True</c>) may result in longer processing times.</remarks> Public Overloads Function Merge(ByVal PDFFiles As List(Of System.IO.FileInfo),ByVal UseSmartMerge As Boolean,ByVal OutputFileName As String,ByVal OverwriteExistingPDF As Boolean,ByVal SortOrder As PDFMergeSortOrder) As System.IO.FileInfo Dim ResultFile As System.IO.FileInfo = Nothing ...<merge the files>... Return ResultFile End Function 重载方法 ''' <summary> ''' Merges multiple PDF files into a single PDF file ''' </summary> ''' <param name="PDFFiles">A list of specific PDF files to merge</param> ''' <param name="OutputFileName">The PDF file to create from the merged PDF files</param> ''' <param name="OverwriteExistingPDF">If the specified PDF file already exists,identifies whether or not to overwrite the existing file</param> ''' <returns>A FileInfo object representing the merged PDF if successful. <cref>Nothing</cref> if unsuccessful.</returns> Public Overloads Function Merge(ByVal PDFFiles As List(Of System.IO.FileInfo),ByVal OverwriteExistingPDF As Boolean) As System.IO.FileInfo Return Merge(PDFFiles,False,OutputFileName,PDFMergeSortOrder.Original) End Function ''' <summary> ''' Merges multiple PDF files into a single PDF file ''' </summary> ''' <param name="PDFFiles">A list of specific PDF files to merge</param> ''' <param name="UseSmartMerge">Identifies whether to use a regular <see cref="iTextSharp.text.pdf.PdfCopy"/> or the <see cref="iTextSharp.text.pdf.PdfSmartCopy"/> for merging</param> ''' <param name="OutputFileName">The PDF file to create from the merged PDF files</param> ''' <param name="OverwriteExistingPDF">If the specified PDF file already exists,identifies whether or not to overwrite the existing file</param> ''' <returns>A FileInfo object representing the merged PDF if successful. <cref>Nothing</cref> if unsuccessful.</returns> ''' <remarks>Using the <see cref="iTextSharp.text.pdf.PdfCopy"/> (<paramref name="UseSmartMerge"/> = <c>False</c>) may result in larger files,UseSmartMerge,PDFMergeSortOrder.Original) End Function ''' <summary> ''' Merges multiple PDF files into a single PDF file ''' </summary> ''' <param name="PDFFiles">A list of specific PDF files to merge</param> ''' <param name="OutputFileName">The PDF file to create from the merged PDF files</param> ''' <param name="SortOrder">Identifies the order in which to add the source PDF files to the output file</param> ''' <returns>A FileInfo object representing the merged PDF if successful. <cref>Nothing</cref> if unsuccessful.</returns> Public Overloads Function Merge(ByVal PDFFiles As List(Of System.IO.FileInfo),ByVal SortOrder As PDFMergeSortOrder) As System.IO.FileInfo Return Merge(PDFFiles,SortOrder) End Function ''' <summary> ''' Merges multiple PDF files into a single PDF file ''' </summary> ''' <param name="PDFFiles">A list of specific PDF files to merge</param> ''' <param name="UseSmartMerge">Identifies whether to use a regular <see cref="iTextSharp.text.pdf.PdfCopy"/> or the <see cref="iTextSharp.text.pdf.PdfSmartCopy"/> for merging</param> ''' <param name="OutputFileName">The PDF file to create from the merged PDF files</param> ''' <param name="SortOrder">Identifies the order in which to add the source PDF files to the output file</param> ''' <returns>A FileInfo object representing the merged PDF if successful. <cref>Nothing</cref> if unsuccessful.</returns> ''' <remarks>Using the <see cref="iTextSharp.text.pdf.PdfCopy"/> (<paramref name="UseSmartMerge"/> = <c>False</c>) may result in larger files,SortOrder) End Function #End Region 解决方法
无论何时涉及到房产,它都是不费吹灰之力的.我的建议是将
value标签扩展为以下内容:
''' <summary>Returns the number of times Counter was called.</summary> ''' <value>Default: 0</value> ''' <returns><see cref="Integer"/> value based on the number of times Counter was called.</returns> Public Property Counter As Integer 然而,当谈到方法时(这是你最初提出的问题),那么我会选择你的直觉并将其包含在remarks标签或returns中. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |