Skip to content

Instantly share code, notes, and snippets.

@plioi
Created November 18, 2011 03:17
Show Gist options
  • Save plioi/1375494 to your computer and use it in GitHub Desktop.
Save plioi/1375494 to your computer and use it in GitHub Desktop.
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