Created
November 26, 2016 13:34
-
-
Save Alan-FGR/4abdddd1d0317c2d8ed6a65c0f9ce925 to your computer and use it in GitHub Desktop.
Why?
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
// OK | |
internal static class Cache | |
{ | |
private static readonly ResourceCache _cache; | |
static Cache() | |
{ | |
_cache = AtomicNET.GetSubsystem<ResourceCache>(); | |
} | |
public static T Get<T>(string path) where T : Resource | |
{ | |
return _cache.Get<T>(path); | |
} | |
} | |
// NOT OK? | |
internal static class Cache | |
{ | |
private static readonly ResourceCache _cache = AtomicNET.GetSubsystem<ResourceCache>(); | |
public static T Get<T>(string path) where T : Resource | |
{ | |
return _cache.Get<T>(path); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment