/// <summary>Initializes this object.</summary>
        ///
        /// <exception cref="ApplicationException">Thrown when an Application error condition occurs.</exception>
        protected override sealed void Initialize()
        {
            if (RootDirInfo == null)
                RootDirInfo = new DirectoryInfo(AppHost.Config.WebHostPhysicalPath);

            if (RootDirInfo == null || ! RootDirInfo.Exists)
                throw new ApplicationException(
                    "RootDir '{0}' for virtual path does not exist".Fmt(RootDirInfo.FullName));

            RootDir = new FileSystemVirtualDirectory(this, null, RootDirInfo);
        }
Exemplo n.º 2
0
        /// <summary>Initializes this object.</summary>
        ///
        /// <exception cref="ApplicationException">Thrown when an Application error condition occurs.</exception>
        protected override sealed void Initialize()
        {
            if (RootDirInfo == null)
            {
                RootDirInfo = new DirectoryInfo(AppHost.Config.WebHostPhysicalPath);
            }

            if (RootDirInfo == null || !RootDirInfo.Exists)
            {
                throw new ApplicationException(
                          "RootDir '{0}' for virtual path does not exist".Fmt(RootDirInfo.FullName));
            }

            RootDir = new FileSystemVirtualDirectory(this, null, RootDirInfo);
        }