Exemple #1
0
        /// <summary>
        /// Initializes a new instance of <see cref="ParameterDocumentation"/>.
        /// </summary>
        /// <param name="overloadDocumentation">The overload that defines the parameter.</param>
        /// <param name="definition">The underlying Mono.Cecil definition of the parameter.</param>
        /// <param name="xmlDocsProvider">The XML documentation provider to use for loading XML documentation comments.</param>
        internal ParameterDocumentation(OverloadDocumentation overloadDocumentation, ParameterDefinition definition, IXmlDocsProvider xmlDocsProvider)
        {
            OverloadDocumentation = overloadDocumentation ?? throw new ArgumentNullException(nameof(overloadDocumentation));
            xmlDocsProvider       = xmlDocsProvider ?? throw new ArgumentNullException(nameof(xmlDocsProvider));
            Definition            = definition ?? throw new ArgumentNullException(nameof(definition));

            ParameterType = definition.ParameterType.ToTypeId();

            Description = xmlDocsProvider.TryGetDocumentationComments(overloadDocumentation.MemberId)?.Parameters?.GetValueOrDefault(definition.Name);
        }
Exemple #2
0
 /// <inheritdoc />
 public IDocumentation?TryGetDocumentation(MemberId id) =>
 OverloadDocumentation.TryGetDocumentation(id);