Table of Contents

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

StringComparer

CounterSeparator

protected virtual string CounterSeparator { get; }

Property Value

string

DefaultName

protected virtual string DefaultName { get; }

Property Value

string

MaxLength

protected virtual int MaxLength { get; }

Property Value

int

Methods

IsReserved(string)

protected virtual bool IsReserved(string name)

Parameters

name string

Returns

bool

IsValidCharacter(char)

protected virtual bool IsValidCharacter(char chr)

Parameters

chr char

Returns

bool

IsValidFirstCharacter(char)

protected virtual bool IsValidFirstCharacter(char chr)

Parameters

chr char

Returns

bool

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

string

Normalize(string?)

Normalize parameter name and return normalized name.

public string? Normalize(string? originalName)

Parameters

originalName string

Original parameter name.

Returns

string

Normalized parameter name.