Пример #1
0
 public async Task<IActionResult> OptimizeAsync()
 {
     if (!_user.HasPermission(Permissions.OPTIMIZE_SYMBOL))
         throw new Shared.Exceptions.InsuficientPermission()
         {
             ResourceName = "Optimize",
             ResourceId = "Optimize",
             ResourceType = typeof(Data.Models.Symbols.Symbol),
             MissingPermission = Permissions.OPTIMIZE_SYMBOL
         };
     await _symmgr.OptimizeAsync();
     return (Ok());
 }
Пример #2
0
 public static void InitSymbols(ISymbolManager mgr)
 {
     mgr.OptimizeAsync().Wait();
 }