Created
September 8, 2015 14:29
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
using System; | |
namespace Builder | |
{ | |
public class MyClassBuilder | |
{ | |
private string _aNameToSet; | |
private bool _prependPropertyDescriptor = false; | |
private bool _lowerizeOutput = false; | |
public MyClassBuilder SetTheName(string aNameToSet) | |
{ | |
_aNameToSet = aNameToSet; | |
return this; | |
} | |
public MyClassBuilder PrependPropertyDescriptor() | |
{ | |
_prependPropertyDescriptor = true; | |
return this; | |
} | |
public MyClassBuilder LowerizeOutput() | |
{ | |
_lowerizeOutput = true; | |
return this; | |
} | |
public MyClass Build() | |
{ | |
return new MyClass(_aNameToSet, _prependPropertyDescriptor, _lowerizeOutput); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment