Created
December 30, 2015 18:00
-
-
Save Naphier/f98e74c0cf220a9d39be to your computer and use it in GitHub Desktop.
Strategy Pattern Example - String Output - OutputContext
This file contains hidden or 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
public class OutputContext | |
{ | |
IOutputStrategy outputStrategy; | |
public OutputContext(IOutputStrategy outputStrategy) | |
{ | |
this.outputStrategy = outputStrategy; | |
} | |
public string GetOutput(string input) | |
{ | |
return outputStrategy.Output(input); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment