Skip to content

Instantly share code, notes, and snippets.

@rushfrisby
Created February 4, 2015 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rushfrisby/46e42ade6fbe1ef5e179 to your computer and use it in GitHub Desktop.
Save rushfrisby/46e42ade6fbe1ef5e179 to your computer and use it in GitHub Desktop.
RulePlex Switch Pattern Example
switch(policy.LanguageType)
{
case LanguageTypes.CSharp:
// process c# rules
break;
case LanguageTypes.Python:
//process python rules
break;
case LanguageTypes.JavaScript:
//process javascript rules
break;
default:
//throw an error about not knowing how to process the rules
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment