Example #1
0
        protected override INode CreateNode(INodeAddress address, NodeType nodeType)
        {
            var retval = this.foriegnRoot.Resolve("." + address.PathAndQuery, nodeType, AddressScope.DescendentOrSelf);

            if (retval.NodeType.Is(NodeType.File))
            {
                retval = new ViewFile(this, (ViewNodeAddress)address, (IFile)retval);
            }
            else if (retval.NodeType.Is(NodeType.Directory))
            {
                retval = new ViewDirectory(this, (ViewNodeAddress)address, (IDirectory)retval);
            }
            else
            {
                throw new NotSupportedException(retval.NodeType.ToString());
            }

            return(retval);
        }
		protected override INode CreateNode(INodeAddress address, NodeType nodeType)
		{
			var retval = this.foriegnRoot.Resolve("." + address.PathAndQuery, nodeType, AddressScope.DescendentOrSelf);

			if (retval.NodeType.Is(NodeType.File))
			{
				retval = new ViewFile(this, (ViewNodeAddress)address, (IFile)retval);
			}
			else if (retval.NodeType.Is(NodeType.Directory))
			{
				retval = new ViewDirectory(this, (ViewNodeAddress)address, (IDirectory)retval);
			}
			else
			{
				throw new NotSupportedException(retval.NodeType.ToString());
			}

			return retval;
		}