public async Task AddCatalog(params Uri[] catalogUris) { ThrowIfDisposed(); foreach (var catalogUri in catalogUris) { if (!_catalogs.ContainsKey(catalogUri)) { _catalogs.Add(catalogUri, await CDOCatalog.Load(catalogUri, this)); } } }
public void LoadEmbeddedCatalog(Assembly assembly, string catalogResource) { ThrowIfDisposed(); using (var stream = assembly.GetManifestResourceStream(catalogResource)) { var catalogUri = new Uri($"file://{catalogResource}"); if (!_catalogs.ContainsKey(catalogUri)) { _catalogs.Add(catalogUri, CDOCatalog.Load((JsonObject)JsonValue.Load(stream), this)); } } }