Пример #1
0
 public static LocalStorageModuleCatalog GetCatalog(IOptions <LocalStorageModuleCatalogOptions> options)
 {
     if (_catalog == null)
     {
         var logger = new LoggerFactory().CreateLogger <LocalStorageModuleCatalog>();
         _catalog = new LocalStorageModuleCatalog(options, logger);
         _catalog.Load();
     }
     else
     {
         _catalog.Reload();
     }
     return(_catalog);
 }
Пример #2
0
 public static ExternalModuleCatalog GetCatalog(IOptions <ExternalModuleCatalogOptions> options, LocalStorageModuleCatalog localCatalog)
 {
     if (_catalog == null)
     {
         var client = new ExternalModulesClient(options);
         var logger = new LoggerFactory().CreateLogger <ExternalModuleCatalog>();
         _catalog = new ExternalModuleCatalog(localCatalog, client, options, logger);
         _catalog.Load();
     }
     else
     {
         _catalog.Reload();
     }
     return(_catalog);
 }
Пример #3
0
        public static ExternalModuleCatalog GetCatalog(string authToken, LocalStorageModuleCatalog localCatalog, IEnumerable <string> manifestUrls)
        {
            var options = GetOptions(authToken, manifestUrls);

            return(GetCatalog(options, localCatalog));
        }
Пример #4
0
 public static ExternalModuleCatalog GetCatalog(IOptions <ExternalModuleCatalogOptions> options, LocalStorageModuleCatalog localCatalog)
 {
     if (_catalog == null)
     {
         var platformRelease = GithubManager.GetPlatformRelease(null).GetAwaiter().GetResult();
         PlatformVersion.CurrentVersion = new SemanticVersion(Version.Parse(platformRelease.TagName)); // workaround to see all modules in the external catalog
         var client = new ExternalModulesClient(options);
         var logger = new LoggerFactory().CreateLogger <ExternalModuleCatalog>();
         _catalog = new ExternalModuleCatalog(localCatalog, client, options, logger);
         _catalog.Load();
     }
     else
     {
         _catalog.Reload();
     }
     return(_catalog);
 }