Created
August 16, 2012 13:53
-
-
Save kosperera/bbf5c6c3a8f8441d9a3e to your computer and use it in GitHub Desktop.
Blogged: Don't ask for anything - Code snippet 3
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
public class Document | |
{ | |
private readonly Content html; | |
public Document(Content content) | |
{ | |
html = content; | |
} | |
} | |
public class DocumentFactory | |
{ | |
private readonly HtmlClient client; | |
public DocumentFactory(HtmlClient c) | |
{ | |
client = c; | |
} | |
Document Build(string url) | |
{ | |
return new Document(client.GetContent(url)); | |
} | |
} | |
public class Printer | |
{ | |
public void Print(Document content) | |
{ | |
// HACK: Printing logic goes here. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment