示例#1
0
        public TestFileInfo AddFile(string path, string contents)
        {
            var fileInfo = new TestFileInfo
            {
                Content      = contents,
                PhysicalPath = path,
                Name         = Path.GetFileName(path),
                LastModified = DateTime.UtcNow,
            };

            AddFile(path, fileInfo);

            return(fileInfo);
        }
示例#2
0
        public TestFileInfo AddFile(string path, string contents)
        {
            var fileInfo = new TestFileInfo
            {
                Content      = contents,
                PhysicalPath = Path.Combine(Root, NormalizeAndEnsureValidPhysicalPath(path)),
                Name         = Path.GetFileName(path),
                LastModified = DateTime.UtcNow,
            };

            AddFile(path, fileInfo);

            return(fileInfo);
        }