/// <summary> /// GetLoadedLuas /// </summary> /// <param name="instanceName"></param> /// <returns></returns> /// <exception cref="KVStoreException"></exception> private LoadedLuas GetLoadedLuas(string instanceName) { if (_loadedLuaDict.TryGetValue(instanceName, out LoadedLuas? loadedLuas)) { return(loadedLuas); } InitLoadedLuas(); if (_loadedLuaDict.TryGetValue(instanceName, out LoadedLuas? loadedLuas2)) { return(loadedLuas2); } throw Exceptions.CacheLoadedLuaNotFound(instanceName: instanceName); }
/// <exception cref="CacheException"></exception> protected LoadedLuas GetLoadedLuas(string?instanceName) { if (string.IsNullOrEmpty(instanceName)) { instanceName = DefaultInstanceName; } if (_loadedLuaDict.TryGetValue(instanceName, out LoadedLuas? loadedLuas)) { return(loadedLuas); } InitLoadedLuas(); if (_loadedLuaDict.TryGetValue(instanceName, out LoadedLuas? loadedLuas2)) { return(loadedLuas2); } throw Exceptions.CacheLoadedLuaNotFound(instanceName: instanceName); }