Created
August 18, 2017 14:52
-
-
Save grimley517/fc008867400f09465eea08cc54cf28ca 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
namespace Module.Data | |
{ | |
public class DataFactory | |
{ | |
private static IData data; | |
static IData Create(IData datasubstitute = null) | |
{ | |
if (datasubstitute != null) | |
{ | |
return datasubstitute; | |
} | |
if (data == null) | |
{ | |
data = new Data(); | |
} | |
return data; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment