public static IList <Operation> GetOperations(string langCode, LookupEnums lookup, bool forceUpdate = false) { if (!Operations.ContainsKey(langCode)) { Operations.GetOrAdd(langCode, new ConcurrentDictionary <LookupEnums, IList <Operation> >()); } if (!Operations[langCode].ContainsKey(lookup)) { Operations[langCode].GetOrAdd(lookup, _commands.GetOperations(langCode, lookup)); } else if (!Operations[langCode][lookup].Any() || forceUpdate) { Operations[langCode].AddOrUpdate(lookup, _commands.GetOperations(langCode, lookup)); } return(Operations[langCode][lookup]); }
/// <summary> /// gets list of operations /// </summary> /// <param name="lookup"></param> /// <returns></returns> public static IList <Operation> GetOperations(LookupEnums lookup, bool forceUpdate = false) { return(CoreCache.GetOperations(ActiveUser.LangCode, lookup, forceUpdate)); }
public IQueryable <Operation> GetOperations(LookupEnums lookup, bool forceUpdate = false) { _command.ActiveUser = ActiveUser; return(_command.GetOperations(lookup, forceUpdate).AsQueryable()); }