Definition

Assembly: CloudNimble.DotNetDocs.Core.dll Namespace: CloudNimble.DotNetDocs.Core Inheritance: CloudNimble.DotNetDocs.Core.DocEntity

Syntax

CloudNimble.DotNetDocs.Core.DocParameter

Summary

Represents documentation for a method or constructor parameter.

Remarks

Contains metadata about a parameter, extracted from Roslyn symbols and enhanced with conceptual documentation.

Constructors

.ctor

Initializes a new instance of the DocParameter class.

Syntax

public DocParameter(Microsoft.CodeAnalysis.IParameterSymbol symbol)

Parameters

NameTypeDescription
symbolMicrosoft.CodeAnalysis.IParameterSymbolThe Roslyn parameter symbol.

Exceptions

ExceptionDescription
ArgumentNullExceptionThrown when symbol is null.

Properties

DefaultValue

Gets the default value of the parameter, if any.

Syntax

public string DefaultValue { get; set; }

Property Value

Type: string? The default value as a string, or null if no default value exists.

HasDefaultValue

Gets or sets a value indicating whether this parameter has a default value.

Syntax

public bool HasDefaultValue { get; set; }

Property Value

Type: bool True if the parameter has a default value; otherwise, false.

IsOptional

Gets or sets a value indicating whether this parameter is optional.

Syntax

public bool IsOptional { get; set; }

Property Value

Type: bool True if the parameter is optional; otherwise, false.

IsParams

Gets or sets a value indicating whether this parameter uses the params keyword.

Syntax

public bool IsParams { get; set; }

Property Value

Type: bool True if the parameter is a params array; otherwise, false.

Name

Gets or sets the name of the parameter.

Syntax

public string Name { get; set; }

Property Value

Type: string The parameter name.

ParameterType

Gets the parameter type documentation.

Syntax

public CloudNimble.DotNetDocs.Core.DocType ParameterType { get; set; }

Property Value

Type: CloudNimble.DotNetDocs.Core.DocType? Documentation for the parameter’s type.

Symbol

Gets the Roslyn symbol for the parameter.

Syntax

public Microsoft.CodeAnalysis.IParameterSymbol Symbol { get; }

Property Value

Type: Microsoft.CodeAnalysis.IParameterSymbol The underlying Roslyn parameter symbol containing metadata.

TypeName

Gets or sets the type name of the parameter.

Syntax

public string TypeName { get; set; }

Property Value

Type: string? The fully qualified type name of the parameter.