This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

UidDisplay Pennington.ApiMetadata

Formatting helpers for xmldocid strings (the T:, M:, P:… prefixed uids the C# compiler emits).

Methods

Shorten

#
public static string Shorten(string uid)

Returns the short, unqualified display name for a uid (e.g. T:System.Collections.Generic.List`1List), stripping the kind prefix, any parameter list, the namespace, and generic-arity markers.

Parameters

uid string

Returns

string

Pennington.ApiMetadata.UidDisplay

namespace Pennington.ApiMetadata;

/// Formatting helpers for xmldocid strings (the T:, M:, P:… prefixed uids the C# compiler emits).
public class UidDisplay
{
    /// Returns the short, unqualified display name for a uid (e.g. T:System.Collections.Generic.List`1List), stripping the kind prefix, any parameter list, the namespace, and generic-arity markers.
    
public static string Shorten(string uid)
; }