Table of Contents

Class IdentifierNormalizer

Namespace
SEBT.Portal.Core.Utilities
Assembly
SEBT.Portal.Core.dll

Utility class for normalizing identifier values to ensure consistent storage and comparison. Strips dashes and spaces to produce a canonical form.

public static class IdentifierNormalizer
Inheritance
object
IdentifierNormalizer

Methods

Normalize(string)

Normalizes an identifier by trimming whitespace and removing dashes and spaces.

public static string Normalize(string value)

Parameters

value string

The identifier to normalize.

Returns

string

The normalized identifier.

Exceptions

ArgumentException

Thrown when the identifier is null or whitespace.

NormalizeOrNull(string?)

Normalizes an identifier by trimming whitespace and removing dashes and spaces, or returns null if the input is null or whitespace.

public static string? NormalizeOrNull(string? value)

Parameters

value string

The identifier to normalize, or null/whitespace.

Returns

string

The normalized identifier, or null if the input was null or whitespace.