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+1dadc87dcf0a0f837e19a3ce2deb7c1cd85375d1
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