Skip to content

Instantly share code, notes, and snippets.

@ashmind
Created November 19, 2014 01:21
Show Gist options
  • Save ashmind/114375d0245b7b5ab8e8 to your computer and use it in GitHub Desktop.
Save ashmind/114375d0245b7b5ab8e8 to your computer and use it in GitHub Desktop.
public class Node {}
public class NodeA : Node {}
public class NodeB : Node {}
public class NodeBProcessor : Processor<NodeB> {
}
public class ProcessingDispatcher {
public void Dispatch(Node node) {
var processor = FindBestProcessorFor(node);
processor.Process(node);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment