Esempio n. 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());
 }
Esempio n. 2
0
 public static void InitSymbols(ISymbolManager mgr)
 {
     mgr.OptimizeAsync().Wait();
 }