Ejemplo n.º 1
0
        protected EntityDirectoryFileSystemContext(IEntityDirectoryFileSystem fileSystem)
        {
            if (fileSystem == null)
            {
                throw new ArgumentNullException("fileSystem");
            }

            FileSystem = fileSystem;
        }
Ejemplo n.º 2
0
        public EntityDirectory(IEntityDirectoryFileSystem fileSystem, EntityReference entityReference, DirectoryType directoryType) : base(fileSystem)
        {
            if (entityReference == null)
            {
                throw new ArgumentNullException("entityReference");
            }
            if (directoryType == null)
            {
                throw new ArgumentNullException("directoryType");
            }

            _entityReference = entityReference;
            DirectoryType    = directoryType;
        }
Ejemplo n.º 3
0
        protected Directory(IEntityDirectoryFileSystem fileSystem)
        {
            if (fileSystem == null)
            {
                throw new ArgumentNullException("fileSystem");
            }

            FileSystem = fileSystem;

            _canRead  = new Lazy <bool>(GetCanRead, LazyThreadSafetyMode.None);
            _canWrite = new Lazy <bool>(GetCanWrite, LazyThreadSafetyMode.None);
            _children = new Lazy <DirectoryContent[]>(GetChildren, LazyThreadSafetyMode.None);
            _entity   = new Lazy <Entity>(GetEntity, LazyThreadSafetyMode.None);
            _info     = new Lazy <DirectoryContent>(GetInfo, LazyThreadSafetyMode.None);
            _url      = new Lazy <string>(GetUrl, LazyThreadSafetyMode.None);
        }
Ejemplo n.º 4
0
        public EntityFileSystemContext(IEntityDirectoryFileSystem fileSystem, Entity root, DirectoryType rootDirectoryType, IDirectory current) : base(fileSystem)
        {
            if (root == null)
            {
                throw new ArgumentNullException("root");
            }
            if (rootDirectoryType == null)
            {
                throw new ArgumentNullException("rootDirectoryType");
            }
            if (current == null)
            {
                throw new ArgumentNullException("current");
            }

            Root = root;
            RootDirectoryType = rootDirectoryType;
            _current          = current;

            _tree = new Lazy <DirectoryTreeNode>(GetTree, LazyThreadSafetyMode.None);
        }
        public ContentMapFileSystemContext(IEntityDirectoryFileSystem fileSystem, ContentMap contentMap, WebPageNode root, IDirectory current) : base(fileSystem)
        {
            if (contentMap == null)
            {
                throw new ArgumentNullException("contentMap");
            }
            if (root == null)
            {
                throw new ArgumentNullException("root");
            }
            if (current == null)
            {
                throw new ArgumentNullException("current");
            }

            ContentMap = contentMap;
            Root       = root;
            _current   = current;

            _tree = new Lazy <DirectoryTreeNode>(GetTree, LazyThreadSafetyMode.None);
        }