Пример #1
0
        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();
        }
Пример #2
0
        [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;
 }
Пример #4
0
 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;
 }
Пример #6
0
 public ResourceRenameProvider(IResourceCatalog resourceCatalog, IServerVersionRepository versionRepository)
 {
     _resourceCatalog   = resourceCatalog;
     _versionRepository = versionRepository;
 }
Пример #7
0
 public ResourceDeleteProvider(IResourceCatalog resourceCatalog, IServerVersionRepository serverVersionRepository)
 {
     _resourceCatalog         = resourceCatalog;
     _serverVersionRepository = serverVersionRepository;
 }
Пример #8
0
 public ResourceCatalogPluginContainer(IServerVersionRepository versionRepository, ConcurrentDictionary <Guid, List <IResource> > workspaceResources, IEnumerable <DynamicService> managementServices = null)
 {
     _versionRepository  = versionRepository;
     _workspaceResources = workspaceResources;
     _managementServices = managementServices;
 }