Last active
December 22, 2016 21:16
-
-
Save antonfirsov/857010b844a5d054fc4d90022ce7ad12 to your computer and use it in GitHub Desktop.
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 static class TestUtilities | |
{ | |
private static ConcurrentDictionary<string, TestFile> cache = new ConcurrentDictionary<string, TestFile>(); | |
public static TestFile ToTestFile(this string fileName) | |
{ | |
TestFile result; | |
if (!cache.TryGetValue(fileName, out result)) | |
{ | |
result = new TestFile(cache); | |
cache[testFile] = result; | |
} | |
return result; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment