Class NamespacedNamingPolicy
- Namespace
- Cratis.Serialization
- Assembly
- Cratis.Fundamentals.dll
Represents a naming policy that applies a namespaced naming convention.
public class NamespacedNamingPolicy : NamingPolicy, INamingPolicy
- Inheritance
-
NamespacedNamingPolicy
- Implements
- Inherited Members
- Extension Methods
Constructors
NamespacedNamingPolicy(int, char, string, bool, bool)
Represents a naming policy that applies a namespaced naming convention.
public NamespacedNamingPolicy(int segmentsToSkip = 0, char separator = '-', string prefix = "", bool camelCase = false, bool pluralizeReadModelNames = true)
Parameters
segmentsToSkipintOptionally number of segments in the namespace to skip. Defaults to 0.
separatorcharOptional separator character to use between namespace segments. Defaults to '-'.
prefixstringOptional prefix to prepend all collection names with.
camelCaseboolWhether to apply camel case to the names.
pluralizeReadModelNamesboolWhether to pluralize the read model names. Defaults to true.
Properties
JsonPropertyNamingPolicy
Gets the JSON property naming policy.
public override JsonNamingPolicy? JsonPropertyNamingPolicy { get; }
Property Value
Methods
GetPropertyNameImplementation(string)
Gets the property name from an existing name.
protected override string GetPropertyNameImplementation(string name)
Parameters
namestringThe name of the property.
Returns
- string
The desired name of the property.
GetReadModelNameImplementation(Type)
Gets the read model name for the specified type.
protected override string GetReadModelNameImplementation(Type readModelType)
Parameters
readModelTypeTypeThe type of the read model.
Returns
- string
The desired name of the read model.