public ResourceLoadProvider(ConcurrentDictionary <Guid, List <IResource> > workspaceResources, IServerVersionRepository serverVersionRepository, IEnumerable <DynamicService> managementServices = null) : this(new FileWrapper()) { try { _perfCounter = CustomContainer.Get <IWarewolfPerformanceCounterLocater>().GetCounter("Count of requests for workflows which don't exist"); } catch (Exception e) { Dev2Logger.Warn("Error getting perf counters. " + e.Message, "Warewolf Warn"); } if (managementServices != null) { foreach (var service in managementServices) { var resource = new ManagementServiceResource(service); ManagementServices.TryAdd(resource.ResourceID, resource); } } _workspaceResources = workspaceResources; _serverVersionRepository = serverVersionRepository; LoadFrequentlyUsedServices(); _typeCache = new TypeCache(); LoadResourceTypeCache(); }
[ExcludeFromCodeCoverage]//used by tests for constructor injection public ResourceCatalog(IEnumerable <DynamicService> managementServices, IServerVersionRepository serverVersionRepository) { InitializeWorkspaceResources(); var versioningRepository = serverVersionRepository; _catalogPluginContainer = new ResourceCatalogPluginContainer(versioningRepository, WorkspaceResources, managementServices); _catalogPluginContainer.Build(this); }
internal ServerExplorerRepository(IResourceCatalog resourceCatalog, IExplorerItemFactory explorerItemFactory, IDirectory directory, IExplorerRepositorySync sync, IServerVersionRepository versionRepository,IFile file) { VerifyArgument.AreNotNull(new Dictionary<string, object> { { "resourceCatalog", resourceCatalog }, { "explorerItemFactory", explorerItemFactory }, { "directory", directory } }); _sync = sync; _file = file; VersionRepository = versionRepository; ResourceCatalogue = resourceCatalog; ExplorerItemFactory = explorerItemFactory; Directory = directory; }
internal ServerExplorerRepository(IResourceCatalog resourceCatalog, IExplorerItemFactory explorerItemFactory, IDirectory directory, IExplorerRepositorySync sync, IServerVersionRepository versionRepository, IFile file) { VerifyArgument.AreNotNull(new Dictionary <string, object> { { "resourceCatalog", resourceCatalog }, { "explorerItemFactory", explorerItemFactory }, { "directory", directory } }); _sync = sync; _file = file; VersionRepository = versionRepository; ResourceCatalogue = resourceCatalog; ExplorerItemFactory = explorerItemFactory; Directory = directory; }
public ServerExplorerRepository(IResourceCatalog resourceCatalog, IExplorerItemFactory explorerItemFactory, IDirectory directory, IExplorerRepositorySync sync, IServerVersionRepository versionRepository, IFile file, ITestCatalog testCatalog) { VerifyArgument.AreNotNull(new Dictionary <string, object> { { "resourceCatalog", resourceCatalog }, { "explorerItemFactory", explorerItemFactory }, { "directory", directory }, { nameof(testCatalog), testCatalog } }); _sync = sync; _file = file; VersionRepository = versionRepository; ResourceCatalogue = resourceCatalog; ExplorerItemFactory = explorerItemFactory; Directory = directory; TestCatalog = testCatalog; IsDirty = false; }
public ResourceRenameProvider(IResourceCatalog resourceCatalog, IServerVersionRepository versionRepository) { _resourceCatalog = resourceCatalog; _versionRepository = versionRepository; }
public ResourceDeleteProvider(IResourceCatalog resourceCatalog, IServerVersionRepository serverVersionRepository) { _resourceCatalog = resourceCatalog; _serverVersionRepository = serverVersionRepository; }
public ResourceCatalogPluginContainer(IServerVersionRepository versionRepository, ConcurrentDictionary <Guid, List <IResource> > workspaceResources, IEnumerable <DynamicService> managementServices = null) { _versionRepository = versionRepository; _workspaceResources = workspaceResources; _managementServices = managementServices; }