You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <summary>/// Extensions of <see cref="IPrincipal"/>/// </summary>publicstaticclassIPrincipalExtensions{/// <summary>/// Converts <see cref="IPrincipal"/> to a <see cref="string"/> representation of the user’s name./// </summary>/// <param name="principal">The principal.</param>/// <param name="defaultUserName">Default name of the user.</param>/// <returns></returns>publicstaticstringToUserName(thisIPrincipal?principal,stringdefaultUserName){varuserName= principal?.Identity?.Name;returnuserName??defaultUserName;}}
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: