Skip to content

Instantly share code, notes, and snippets.

@glennblock
Last active January 2, 2016 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glennblock/2f88c743c95a4b018aab to your computer and use it in GitHub Desktop.
Save glennblock/2f88c743c95a4b018aab to your computer and use it in GitHub Desktop.
def executeRule(rule as duck):
rule.Execute()
return
type rule interface {
Execute()
}
func ExecuteRule(x rule) {
x.Execute()
}
function executeRule(rule) {
rule.execute();
}
def executeRule(rule: {def execute(): Unit}) = {
rule.execute()
}
Public Function ExecuteRule(ByRef Rule as Object)
Rule.Execute()
End Function
public void ExecuteRule(dynamic rule) {
rule.execute();
}
public interface IRule {
void Execute();
}
public void Execute(IRule rule) {
rule.Execute();
}
public void ExecuteRule(object rule) {
rule.GetType().GetMethod("Execute", BindingFlags.Public | BindingFlags.Instance).Invoke(rule);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment