Ejemplo n.º 1
0
        public override void SetUp()
        {
            base.SetUp();

            root = CreateOneItem<RootNode>(1, "root", null);
            start = CreateOneItem<RootNode>(2, "start", root);
            host = new Host(new ThreadContext(), root.ID, start.ID);

            fs = new FakeMappedFileSystem();
            fs.BasePath = AppDomain.CurrentDomain.BaseDirectory + @"\FileSystem\";

            vnf = new VirtualNodeFactory();
            config = new EditSection();

            injector = new FakeDependencyInjector();
            injector.injectors.Add(new EntityDependencySetter<IFileSystem>(fs));
            injector.injectors.Add(new EntityDependencySetter<IDependencyInjector>(injector));
            var sizeCache = new ImageSizeCache(new ConfigurationManagerWrapper { Sections = new ConfigurationManagerWrapper.ContentSectionTable(null, null, null, config) });
            injector.injectors.Add(new EntityDependencySetter<ImageSizeCache>(sizeCache));
            //nodeProvider = new FolderNodeProvider(fs, persister, injector);
            //initializer = new VirtualFolderInitializer(host, persister, fs, vnf, new Plugin.ConnectionMonitor().SetConnected(SystemStatusLevel.UpAndRunning), config, new ImageSizeCache(new ConfigurationManagerWrapper { Sections = new ConfigurationManagerWrapper.ContentSectionTable(null, null, null, config) }), nodeProvider);
            //nodeProvider = new FolderNodeProvider(fs, persister, injector);
            //nodeProvider = new FolderNodeProvider(fs, persister, injector);
            nodeProvider = new FolderNodeProvider(fs, persister.Repository, injector);
            initializer = new VirtualFolderInitializer(host, persister, fs, vnf, monitor = new Plugin.ConnectionMonitor().SetConnected(SystemStatusLevel.UpAndRunning), new UploadFolderSource(host, config), nodeProvider);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VirtualFolderInitializer"/> class.
 /// </summary>
 /// <param name="host">The host.</param>
 /// <param name="persister">The persister.</param>
 /// <param name="fs">The fs.</param>
 /// <param name="virtualNodes">The virtual nodes.</param>
 /// <param name="editConfig">The edit config.</param>
 public VirtualFolderInitializer(IHost host, IPersister persister, IFileSystem fs, VirtualNodeFactory virtualNodes, ConnectionMonitor monitor, EditSection editConfig, ImageSizeCache imageSizes, FolderNodeProvider nodeProvider)
 {
     this.host         = host;
     this.persister    = persister;
     this.virtualNodes = virtualNodes;
     this.monitor      = monitor;
     this.folders      = editConfig.UploadFolders;
     this.nodeProvider = nodeProvider;
 }
Ejemplo n.º 3
0
		/// <summary>
		/// Initializes a new instance of the <see cref="VirtualFolderInitializer"/> class.
		/// </summary>
		/// <param name="host">The host.</param>
		/// <param name="persister">The persister.</param>
		/// <param name="fs">The fs.</param>
		/// <param name="virtualNodes">The virtual nodes.</param>
		/// <param name="editConfig">The edit config.</param>
		public VirtualFolderInitializer(IHost host, IPersister persister, IFileSystem fs, VirtualNodeFactory virtualNodes, ConnectionMonitor monitor, UploadFolderSource folderSource, FolderNodeProvider nodeProvider)
		{
			this.host = host;
			this.persister = persister;
			this.virtualNodes = virtualNodes;
			this.monitor = monitor;
			this.folderSource = folderSource;
			this.nodeProvider = nodeProvider;
		}
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VirtualFolderInitializer"/> class.
 /// </summary>
 /// <param name="host">The host.</param>
 /// <param name="persister">The persister.</param>
 /// <param name="fs">The fs.</param>
 /// <param name="virtualNodes">The virtual nodes.</param>
 /// <param name="editConfig">The edit config.</param>
 public VirtualFolderInitializer(IHost host, IPersister persister, IFileSystem fs, VirtualNodeFactory virtualNodes, ConnectionMonitor monitor, UploadFolderSource folderSource, FolderNodeProvider nodeProvider)
 {
     this.host         = host;
     this.persister    = persister;
     this.virtualNodes = virtualNodes;
     this.monitor      = monitor;
     this.folderSource = folderSource;
     this.nodeProvider = nodeProvider;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="VirtualFolderInitializer"/> class.
 /// </summary>
 /// <param name="host">The host.</param>
 /// <param name="persister">The persister.</param>
 /// <param name="fs">The fs.</param>
 /// <param name="virtualNodes">The virtual nodes.</param>
 /// <param name="editConfig">The edit config.</param>
 public VirtualFolderInitializer(IHost host, IPersister persister, IFileSystem fs, VirtualNodeFactory virtualNodes, ConnectionMonitor monitor, EditSection editConfig, ImageSizeCache imageSizes, FolderNodeProvider nodeProvider)
 {
     this.host = host;
     this.persister = persister;
     this.virtualNodes = virtualNodes;
     this.monitor = monitor;
     this.folders = editConfig.UploadFolders;
     this.nodeProvider = nodeProvider;
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VirtualFolderInitializer"/> class.
        /// </summary>
        /// <param name="host">The host.</param>
        /// <param name="persister">The persister.</param>
        /// <param name="fs">The fs.</param>
        /// <param name="virtualNodes">The virtual nodes.</param>
        /// <param name="editConfig">The edit config.</param>
        public VirtualFolderInitializer(IHost host, IPersister persister, IFileSystem fs, VirtualNodeFactory virtualNodes, DatabaseStatusCache dbStatus, EditSection editConfig, ImageSizeCache imageSizes)
        {
            this.host = host;
            this.persister = persister;
            this.fs = fs;
            this.virtualNodes = virtualNodes;
            this.dbStatus = dbStatus;
            this.folders = editConfig.UploadFolders;

            nodeProvider = new FolderNodeProvider(fs, persister, imageSizes);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VirtualFolderInitializer"/> class.
        /// </summary>
        /// <param name="host">The host.</param>
        /// <param name="persister">The persister.</param>
        /// <param name="fs">The fs.</param>
        /// <param name="virtualNodes">The virtual nodes.</param>
        /// <param name="editConfig">The edit config.</param>
        public VirtualFolderInitializer(IHost host, IPersister persister, IFileSystem fs, VirtualNodeFactory virtualNodes, DatabaseStatusCache dbStatus, EditSection editConfig)
        {
            this.host         = host;
            this.persister    = persister;
            this.fs           = fs;
            this.virtualNodes = virtualNodes;
            this.dbStatus     = dbStatus;
            this.folders      = editConfig.UploadFolders;

            nodeProvider = new FolderNodeProvider(fs, persister);
        }
Ejemplo n.º 8
0
 public FileSystemSource(FolderNodeProvider nodes)
 {
     this.nodes = nodes;
 }
Ejemplo n.º 9
0
 public FileSystemSource(FolderNodeProvider nodes)
 {
     this.nodes = nodes;
     BaseContentType = typeof(AbstractNode);
 }
Ejemplo n.º 10
0
 public FileSystemSource(FolderNodeProvider nodes)
 {
     this.nodes      = nodes;
     BaseContentType = typeof(AbstractNode);
 }