Class UniqueParametersNormalizer
- Namespace
- LinqToDB.DataProvider
- Assembly
- linq2db.dll
Parameter name rules, implemented by this policy:
- duplicate name check is case-insensitive
- max name length: 50 characters
- allowed characters: ASCII digits, ASCII letters, _ (underscore).
- allowed first character: ASCII letter.
- default name if name missing/invalid: "p"
- duplicates resolved by adding "_counter" suffix
public class UniqueParametersNormalizer : IQueryParametersNormalizer
- Inheritance
-
UniqueParametersNormalizer
- Implements
- Derived
- Extension Methods
Properties
Comparer
protected virtual StringComparer Comparer { get; }
Property Value
CounterSeparator
protected virtual string CounterSeparator { get; }
Property Value
DefaultName
protected virtual string DefaultName { get; }
Property Value
MaxLength
protected virtual int MaxLength { get; }
Property Value
Methods
IsReserved(string)
protected virtual bool IsReserved(string name)
Parameters
name
string
Returns
IsValidCharacter(char)
protected virtual bool IsValidCharacter(char chr)
Parameters
chr
char
Returns
IsValidFirstCharacter(char)
protected virtual bool IsValidFirstCharacter(char chr)
Parameters
chr
char
Returns
MakeValidName(string)
Method should validate name characters and remove or replace invalid characters. Default implementation removes all characters except ASCII letters/digits and underscore.
protected virtual string MakeValidName(string name)
Parameters
name
string
Returns
Normalize(string?)
Normalize parameter name and return normalized name.
public string? Normalize(string? originalName)
Parameters
originalName
stringOriginal parameter name.
Returns
- string
Normalized parameter name.