WebExtensionsRoleLabel Method

Retrieves readable string for RoleDtoid. If the role wasn't found, a localized "NotFound" string is returned.

Definition

Namespace: MobileTrack.Web.Components.Extensions
Assembly: MobileTrack.Web.Components (in MobileTrack.Web.Components.dll) Version: 0.7+ce90b2cf6b782b8d7b7fd47b3c546987c652c00f
public static string RoleLabel(
	this Dictionary<Guid, RoleDto> roles,
	Guid id,
	IStringLocalizer loc
)

Parameters

roles  DictionaryGuid, RoleDto
Available roles
id  Guid
ID of the role to look up.
loc  IStringLocalizer
Localization tool for built-in strings

Return Value

String
Proper role label.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DictionaryGuid, RoleDto. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentNullExceptionThrown if loc is

See Also