YamlNamingPolicy Class

Determines the naming policy used to convert a CLR member name to a YAML key.

public abstract class YamlNamingPolicy

Constructors

NameDescription
YamlNamingPolicy()Initializes a new instance of the YamlNamingPolicy class.

YamlNamingPolicy()

YamlNamingPolicy.cs

Initializes a new instance of the YamlNamingPolicy class.

protected YamlNamingPolicy()

Properties

NameDescription
CamelCaseGets the naming policy for camelCase.
KebabCaseLowerGets the naming policy for kebab-case (lowercase).
KebabCaseUpperGets the naming policy for KEBAB-CASE (uppercase).
PascalCaseGets the naming policy for PascalCase.
SnakeCaseLowerGets the naming policy for snake_case (lowercase).
SnakeCaseUpperGets the naming policy for SNAKE_CASE (uppercase).

Gets the naming policy for camelCase.

public static YamlNamingPolicy CamelCase { get; }

Property value

YamlNamingPolicy

KebabCaseLower

YamlNamingPolicy.cs

Gets the naming policy for kebab-case (lowercase).

public static YamlNamingPolicy KebabCaseLower { get; }

Property value

YamlNamingPolicy

KebabCaseUpper

YamlNamingPolicy.cs

Gets the naming policy for KEBAB-CASE (uppercase).

public static YamlNamingPolicy KebabCaseUpper { get; }

Property value

YamlNamingPolicy

Gets the naming policy for PascalCase.

public static YamlNamingPolicy PascalCase { get; }

Property value

YamlNamingPolicy

SnakeCaseLower

YamlNamingPolicy.cs

Gets the naming policy for snake_case (lowercase).

public static YamlNamingPolicy SnakeCaseLower { get; }

Property value

YamlNamingPolicy

SnakeCaseUpper

YamlNamingPolicy.cs

Gets the naming policy for SNAKE_CASE (uppercase).

public static YamlNamingPolicy SnakeCaseUpper { get; }

Property value

YamlNamingPolicy

Methods

NameDescription
ConvertName(string)Converts the specified name according to the policy.

ConvertName(string)

Converts the specified name according to the policy.

public abstract string ConvertName(string name)

Parameters

name string
The CLR member name.

Returns

string The converted name.