示例#1
0
        public void TestPhysicalPath()
        {
            var site = new Site("Site1");

            string expected1 = Path.Combine(site.PhysicalPath, "CustomErrors.config");

            CustomErrorsFile customErrorFile = new CustomErrorsFile(site);
            Assert.AreEqual(expected1, customErrorFile.PhysicalPath, true);
        }
示例#2
0
 public void ExportToDisk(Site site)
 {
     var allItem = this.All(site).ToList();
     var file = new CustomErrorsFile(site).PhysicalPath;
     locker.EnterWriteLock();
     try
     {
         Serialization.Serialize<List<CustomError>>(allItem, file);
     }
     finally
     {
         locker.ExitWriteLock();
     }
 }