- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
private static Dictionary<RoleEnum, string> Roles = new Dictionary<RoleEnum, string>
{
{RoleEnum.TeamMember, "Team Member"},
{RoleEnum.ProjectManager, "Project Manager"},
{RoleEnum.ProgramManager, "Program Manager"},
{RoleEnum.PortfolioManager, "Portfolio Manager"},
{RoleEnum.Executive, "Executive"},
{RoleEnum.Undefined, "Undefined"}
};
public static RoleEnum ParseRole(string role)
{
RoleEnum result = RoleEnum.Undefined;
Roles
.Where(_ => _.Value == role)
.ToList()
.ForEach(_ => result = _.Key);
return result;
}
Странное использование дикшинари, очень странное, в обратную сторону можна сказать
Smekalisty 24.04.2014 15:41 # +3
kegdan 25.04.2014 06:55 # 0
guest 25.04.2014 12:43 # 0