Created
February 4, 2015 01:11
-
-
Save rushfrisby/46e42ade6fbe1ef5e179 to your computer and use it in GitHub Desktop.
RulePlex Switch Pattern Example
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
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