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.8+34f1bbd8dc6b32752cfce829cbed66e15113d7ba
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