Ejemplo n.º 1
0
 public ResourceCatalog(IEnumerable <DynamicService> managementServices)
 {
     InitializeWorkspaceResources();
     _serverVersionRepository = new ServerVersionRepository(new VersionStrategy(), this, _directoryWrapper, EnvironmentVariables.GetWorkspacePath(GlobalConstants.ServerWorkspaceID), new FileWrapper(), new FilePathWrapper());
     _catalogPluginContainer  = new ResourceCatalogPluginContainer(_serverVersionRepository, WorkspaceResources, managementServices);
     _catalogPluginContainer.Build(this);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ResourceCatalog" /> class.
        /// <remarks>
        /// DO NOT instantiate directly - use static Instance property instead; this is for testing only!
        /// </remarks>
        /// </summary>
        /// <param name="managementServices">The management services to be loaded.</param>
        public ResourceCatalog(IEnumerable <DynamicService> managementServices = null)
        {
            InitializeWorkspaceResources();
            // MUST load management services BEFORE server workspace!!
            IServerVersionRepository versioningRepository = new ServerVersionRepository(new VersionStrategy(), this, new DirectoryWrapper(), EnvironmentVariables.GetWorkspacePath(GlobalConstants.ServerWorkspaceID), new FileWrapper());

            _catalogPluginContainer = new ResourceCatalogPluginContainer(versioningRepository, WorkspaceResources, managementServices);
            _catalogPluginContainer.Build(this);
        }