Пример #1
0
 private void CopyAssembliesSynchronized(IDictionary <string, ModuleManifest> manifests)
 {
     _distributedLockProvider.ExecuteSynhronized(GetSourceMark(), (x) =>
     {
         if (x != DistributedLockCondition.Delayed)
         {
             CopyAssemblies(_discoveryPath, _options.ProbingPath); // Copy platform files if needed
             foreach (var pair in manifests)
             {
                 var modulePath = Path.GetDirectoryName(pair.Key);
                 CopyAssemblies(modulePath, _options.ProbingPath); // Copy module files if needed
             }
         }
         else // Delayed lock acquire, do nothing here with a notice logging
         {
             _logger.LogInformation("Skip copy assemblies to ProbingPath for local storage (another instance made it)");
         }
     });
 }