Class EndpointUri
Parsed endpoint URI. Immutable record with normalized cache key.
Created by EndpointUriParser — the single URI parser for the entire framework.
public sealed record EndpointUri : IEquatable<EndpointUri>
Inheritance
Implements
Properties
NormalizedKey
Cache key: "{scheme}://{path}" without query parameters.
public string NormalizedKey { get; init; }
RawParameters
Query string parameters as raw strings before type conversion.
public IReadOnlyDictionary<string, string> RawParameters { get; init; }
Methods
AddSensitiveKeys(params string[])
Registers additional query-parameter names that must be masked in logs and
public static void AddSensitiveKeys(params string[] keys)
ForLog(string?, ILogger?)
An endpoint URI or name for an Information line of logger: the short form of
public static string ForLog(string? rawUri, ILogger? logger)
ForLog(string?)
The short log form of a raw endpoint URI: d, and when longer than ,
public static string ForLog(string? rawUri)
IsSensitiveKey(string)
Returns true if a query-parameter name should be masked.
public static bool IsSensitiveKey(string key)
MaskUserInfoPassword(string)
Masks the password in userinfo of a scheme-less path/authority
public static string MaskUserInfoPassword(string pathOrAuthority)
RedactSecrets(string?)
Redacts key=value secret assignments inside arbitrary text — connection strings
public static string RedactSecrets(string? text)
Sanitize(string?)
Format-preserving redaction of a raw endpoint URI string. Keeps scheme,
public static string Sanitize(string? rawUri)
ToMaskedUriString()
Reconstructs the URI with sensitive parameters and userinfo passwords masked.
public string ToMaskedUriString()
ToUriString()
Reconstructs the full URI string including scheme, path, and all query parameters.
public string ToUriString()
Constructors
EndpointUri(string, string, string, IReadOnlyDictionary<string, string>)
Parsed endpoint URI. Immutable record with normalized cache key.