TestimoX

API Reference

Class

PrincipalResolver

Namespace ComputerX.Controls.Security
Assembly ComputerX
Modifiers static

Normalizes principal identifiers (names, localized names, or SID strings) to canonical SID strings to enable stable comparisons across languages and environments.

Inheritance

  • Object
  • PrincipalResolver

Methods

public static String[] NormalizeToSidStrings(IEnumerable<String> principals, String computerName = null) #
Returns: String[]

Normalizes a set of principals into SID strings, skipping those that cannot be resolved.

Parameters

principals System.Collections.Generic.IEnumerable{System.String} requiredposition: 0
computerName System.String = null optionalposition: 1
public static String ToDisplayName(String sid, String computerName = null) #
Returns: String

Best-effort conversion from SID to a display name. On Windows, asks the OS; otherwise returns the SID.

Parameters

sid System.String requiredposition: 0
computerName System.String = null optionalposition: 1
public static Boolean TryNormalizeToSid(String principal, out String sid, String computerName = null) #
Returns: Boolean

Normalizes an input principal name (any language) or SID to a canonical SID string. On Windows, attempts OS resolution for localized names. On non-Windows, falls back to built-in maps.

Parameters

principal System.String requiredposition: 0
sid System.String@ requiredposition: 1
computerName System.String = null optionalposition: 2