예제 #1
0
 public static bool HasBackup(string path)
 {
     try {
         return(File.Exists(BackupPath(path)));
     } catch (Exception e) {
         Debugs.Exception(e);
     }
     return(false);
 }
예제 #2
0
        public void TestAsync()
        {
            var finished = false;
            var hasError = false;
            var start    = new DateTime().Millisecond;

            Asyncs.Execute(() => { Thread.Sleep(100); })
            .Subscribe(_ => {
                Debugs.Log("completed");
                finished = true;
            }, e => {
                Debugs.Exception(e);
                hasError = true;
                finished = true;
            });
            Thread.Sleep(300);
            Assert.AreEqual(true, finished);
            Assert.AreEqual(false, hasError);
        }