Created
November 18, 2011 03:17
-
-
Save plioi/1375494 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Role : Enumeration<Role> | |
{ | |
public static readonly Role System = new Role(0, "System", "System", true); | |
public static readonly Role Manager = new Role(1, "Manager", "Michelle", false); | |
public static readonly Role Employee = new Role(2, "Employee", "Eric", false); | |
public static readonly Role HumanResources = new Role(3, "Human Resources", "Harry", false); | |
private Role(int value, string displayName, string personaName, bool testrole) | |
: base(value, displayName) | |
{ | |
PersonaName = personaName; | |
TestRole = testrole; | |
} | |
public string PersonaName { get; private set; } | |
public bool TestRole { get; private set; } | |
public static IEnumerable<Role> GetAllProductionRoles() | |
{ | |
return GetAll().Where(r => !r.TestRole); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment