Skip to content

Instantly share code, notes, and snippets.

@antonfirsov
Last active December 22, 2016 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antonfirsov/857010b844a5d054fc4d90022ce7ad12 to your computer and use it in GitHub Desktop.
Save antonfirsov/857010b844a5d054fc4d90022ce7ad12 to your computer and use it in GitHub Desktop.
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