示例#1
0
        public VirtualPath(string vpath, string physicalPath, bool isFake)
        {
            IsRooted      = VirtualPathUtility.IsRooted(vpath);
            IsAbsolute    = VirtualPathUtility.IsAbsolute(vpath);
            IsAppRelative = VirtualPathUtility.IsAppRelative(vpath);

            if (isFake)
            {
                if (String.IsNullOrEmpty(physicalPath))
                {
                    throw new ArgumentException("physicalPath");
                }

                _physicalPath = physicalPath;
                Original      = "~/" + Path.GetFileName(_physicalPath);
                IsFake        = true;
            }
            else
            {
                Original = vpath;
                IsFake   = false;
            }
        }