Пример #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);
        }