CodeStyleOptions Class

Namespace
Kampute.DocToolkit.Languages
Assembly
  • Kampute.DocToolkit.dll

Definition

Represents the options that control the behavior of the programming language models when formatting code elements.
public class CodeStyleOptions
Inheritance

Remarks

The CodeStyleOptions class provides a configurable set of formatting preferences that determine how code elements are rendered in documentation. It allows documentation authors to customize the appearance of code signatures and definitions to match their preferred style or organizational standards.

The class offers configuration options for:
  • Parameter formatting and wrapping behavior
  • Type name simplification for system types
  • Name qualification levels for different code elements
  • Attribute visibility and filtering
By providing a single point of configuration, CodeStyleOptions ensures consistent formatting throughout the documentation regardless of where code elements are rendered. This consistency improves readability and maintains a professional appearance across all generated documentation.

Instances of this class can be passed to implementations of IProgrammingLanguage to control their formatting behavior. The default values are chosen to provide a balance between readability and completeness in most documentation scenarios.

Constructors

CodeStyleOptions()Initializes a new instance of the CodeStyleOptions class.

Properties

FullyQualifyExplicitInterfaceMemberNamesGets or sets a value indicating whether to fully qualify explicit interface member names.
GlobalNameQualifierGets or sets the level of qualification to apply to the name of types for types of parameters, return values, extended classes, implemented interfaces, attributes, and type parameters.
IgnoreParameterAttributesGets or sets a value indicating whether to ignore the attributes applied to parameters.
IgnoreReturnParameterAttributesGets or sets a value indicating whether to ignore the attributes applied to return values.
IgnoreTypeAttributesGets or sets a value indicating whether to ignore the attributes applied to types.
IgnoreTypeMemberAttributesGets or sets a value indicating whether to ignore the attributes applied to type members.
IgnoreTypeParameterAttributesGets or sets a value indicating whether to ignore the attributes applied to generic type parameters.
IgnoredAttributesGets the collection of patterns that determine the attributes to exclude from the definition of a type or type's member.
MaxInlineParametersGets or sets the maximum number of parameters in a member definition before wrapping.
SimplifySystemTypeNamesGets or sets a value indicating whether to simplify the names of system types.

Methods

ShouldIgnoreAttribute(ICustomAttribute)Determines whether the specified attribute should be ignored based on the current options and the target where the attribute is applied.