コード例 #1
0
        public void NoFileAddThenRead()
        {
            Directory.CreateDirectory(Path.GetDirectoryName(FullPath));
            File.Delete(FullPath);

            var deleted = new DeletedDefaultAc(FullPath);

            deleted.Add("N567S");
            Assert.IsTrue(deleted.DeletedRegistration().SequenceEqual("N567S"));
        }
コード例 #2
0
        public void AddThenRead()
        {
            Directory.CreateDirectory(Path.GetDirectoryName(FullPath));
            File.WriteAllText(FullPath, text);

            var deleted = new DeletedDefaultAc(FullPath);

            deleted.Add("N567S");
            Assert.IsTrue(deleted.DeletedRegistration().SequenceEqual("A-BCDE", "N331D", "N567S"));
        }
コード例 #3
0
 private void AddToDeletedDefaultAc(string path, string reg)
 {
     if (Paths.PathsAreSame(Path.GetDirectoryName(path), ConfigLoader.DefaultFolderPath))
     {
         var deleted = new DeletedDefaultAc();
         var succeed = deleted.Add(reg);
         if (!succeed)
         {
             ParentControl.ShowError(deleted.ErrorMessage);
         }
     }
 }