Skip to content

Instantly share code, notes, and snippets.

@Naphier
Created December 30, 2015 18:00
Show Gist options
  • Save Naphier/f98e74c0cf220a9d39be to your computer and use it in GitHub Desktop.
Save Naphier/f98e74c0cf220a9d39be to your computer and use it in GitHub Desktop.
Strategy Pattern Example - String Output - OutputContext
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