コード例 #1
0
        /// <summary>
        /// Construct a new <see cref="OverlayedFileSystem"/>.
        /// </summary>
        /// <param name="name">The name of the file system.</param>
        /// <param name="fileSystems">The file systems to initially add to this file system.</param>
        /// <param name="options">The options for the file system.</param>
        /// <param name="overlayedNodeSelector">The <c>OverlayedNodeSelector</c> to use to select/resolve files.</param>
        public OverlayedFileSystem(string name, IEnumerable <IFileSystem> fileSystems, FileSystemOptions options, OverlayedNodeSelector overlayedNodeSelector)
            : base(new StandardNodeAddress(name ?? "overlayed", name != null ? null : OverlayedNodeProvider.NextUniqueName(), 0, 0, "", "", "/", ""), null, VerifyOptions(options))
        {
            this.fileSystems = new List <IFileSystem>();

            foreach (var fs in fileSystems)
            {
                fs.Closed += this.FileSystem_Closed;

                this.fileSystems.Add(fs);
            }

            this.OverlayedNodeSelector = overlayedNodeSelector;
        }
コード例 #2
0
        /// <summary>
        /// Construct a new <see cref="OverlayedFileSystem"/>.
        /// </summary>
        /// <param name="name">The name of the file system.</param>
        /// <param name="fileSystems">The file systems to initially add to this file system.</param>
        /// <param name="options">The options for the file system.</param>
        /// <param name="overlayedNodeSelector">The <c>OverlayedNodeSelector</c> to use to select/resolve files.</param>
        public OverlayedFileSystem(string name, IEnumerable <IFileSystem> fileSystems, FileSystemOptions options, OverlayedNodeSelector overlayedNodeSelector)
            : base(new StandardNodeAddress(name == null ? "overlayed" : name, name != null ? null : OverlayedNodeProvider.NextUniqueName(), 0, 0, "", "", "/", ""), null, VerifyOptions(options))
        {
            this.fileSystems = new List <IFileSystem>();

            foreach (IFileSystem fs in fileSystems)
            {
                fs.Closed += new EventHandler(FileSystem_Closed);

                this.fileSystems.Add(fs);
            }

            readonlyFileSystems = ((List <IFileSystem>) this.fileSystems).AsReadOnly();

            this.OverlayedNodeSelector = overlayedNodeSelector;
        }