Created
November 29, 2016 08:16
-
-
Save chamook/a4520308344b68fe72f2762409e7a342 to your computer and use it in GitHub Desktop.
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 ThingFactory | |
| { | |
| public string ThingName { get; } | |
| public string ThingValue { get; } | |
| public ThingFactory(string thingName, int thingValue) | |
| { | |
| if (thingName == null) | |
| throw new ArgumentNullException(nameof(thingName)); | |
| ThingName = thingName; | |
| ThingValue = thingValue; | |
| } | |
| public Thing MakeThing(string elusiveThirdParameter) | |
| { | |
| if (elusiveThirdParameter == null) | |
| throw new ArgumentNullException(nameof(elusiveThirdParameter)); | |
| return new Thing(ThingName, ThingValue, elusiveThirdParameter); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment