Example #1
0
        public static BUCommon.AccountList BuildAccounts()
        {
            string file = "b2app.accounts.xml";

            file = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), file);

            var acctlst = new BUCommon.AccountList();

            acctlst.load(file);

            file = "b2app.filecache.xml";
            file = System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), file);
            BUCommon.FileCache fc = new BUCommon.FileCache();

            if (File.Exists(file))
            {
                fc.load(file);
            }

            acctlst.filecache = fc;

            foreach (var a in acctlst)
            {
                Load(acctlst, a);
            }

            return(acctlst);
        }
Example #2
0
        public void UploadCacheTest()
        {
            BUCommon.FileCache uc = new BUCommon.FileCache();
            uc.load("C:\\tmp\\photos.cache");

            var files = uc.getdir("2016");

            Assert.IsNotNull(files);
            Assert.IsTrue(files.Any());
        }