Пример #1
0
        public static Dictionary <OperationSymbol, OperationHelp> CachedOperationsHelp()
        {
            return(Operations.Value.GetOrAdd(GetCulture(), ci =>
            {
                var dic = Database.Query <OperationHelpEntity>().Where(n => n.Culture == ci.ToCultureInfoEntity()).ToDictionary(a => a.Operation);

                return OperationLogic.AllSymbols().ToDictionary(o => o, o => new OperationHelp(o, ci, dic.TryGetC(o)));
            }).Where(a => OperationLogic.OperationAllowed(a.Key, inUserInterface: true)).ToDictionary());
        }
Пример #2
0
 public static Dictionary <OperationSymbol, OperationAllowed> AllowedOperations()
 {
     return(OperationLogic.AllSymbols().ToDictionary(k => k, k => cache.GetAllowed(RoleEntity.Current, k)));
 }