Class NamingPolicy
- Namespace
- Cratis.Serialization
- Assembly
- Cratis.Fundamentals.dll
Represents a base class for naming policies.
public abstract class NamingPolicy : INamingPolicy
- Inheritance
-
NamingPolicy
- Implements
- Derived
- Inherited Members
- Extension Methods
Properties
JsonPropertyNamingPolicy
Gets the JSON property naming policy.
public abstract JsonNamingPolicy? JsonPropertyNamingPolicy { get; }
Property Value
Methods
GetPropertyName(string)
Gets the property name based on the naming policy.
public string GetPropertyName(string name)
Parameters
namestringThe name to convert.
Returns
- string
The converted name.
GetPropertyNameImplementation(string)
Gets the property name from an existing name.
protected abstract string GetPropertyNameImplementation(string name)
Parameters
namestringThe name of the property.
Returns
- string
The desired name of the property.
GetReadModelName(Type)
Gets the read model name based on the naming policy.
public string GetReadModelName(Type readModelType)
Parameters
readModelTypeTypeThe read model type to convert.
Returns
- string
The converted name.
GetReadModelNameImplementation(Type)
Gets the read model name for the specified type.
protected abstract string GetReadModelNameImplementation(Type readModelType)
Parameters
readModelTypeTypeThe type of the read model.
Returns
- string
The desired name of the read model.