Ejemplo n.º 1
0
        private static async Task TestObserver()
        {
            var init = await DodjiService.GetInstance(true);

            await init.Repository.AddCollection("my collection");

            var collection = (await init.Repository.GetCollections()).First();
            await init.Repository.AddDestinationFolder(
                new DestinationFolder
            {
                CollectionId = collection.Id,
                Path         = "Y:\\!playgoround\\!dest_mixed3"
            });

            await init.Repository.AddSourceFolder(
                new SourceFolder
            {
                CollectionId     = collection.Id,
                Path             = "Y:\\!playgoround\\!source_files",
                KeepRelativePath = false
            });

            await init.Repository.AddSourceFolder(
                new SourceFolder
            {
                CollectionId     = collection.Id,
                Path             = "Y:\\!playgoround\\!source_folders",
                KeepRelativePath = false
            });
        }
Ejemplo n.º 2
0
        private static async Task TestDataAccess()
        {
            var init = await DodjiService.GetInstance(true);

            await init.Repository.AddCollection("my collection");

            var collection = (await init.Repository.GetCollections()).First();
            var cols2      = await init.Repository.GetCollections();

            var gals = await init.Repository.GetGalleries();

            await init.Repository.RemoveCollection(collection.Id);

            cols2 = await init.Repository.GetCollections();

            await init.Repository.AddCollection("my collection");

            cols2 = await init.Repository.GetCollections();

            await init.Repository.RenameCollection(cols2.First().Id, "my new collection");

            cols2 = await init.Repository.GetCollections();



            //await init.Repository.AddDestinationFolder(
            //    new DestinationFolder
            //    {
            //        CollectionId = collection.Id,
            //        Path = "Y:\\!playgoround\\!dest_mixed3"
            //    });
            //await init.Repository.AddSourceFolder(
            //    new SourceFolder
            //    {
            //        CollectionId = collection.Id,
            //        Path = "Y:\\!playgoround\\!source_files",
            //        KeepRelativePath = false
            //    });
            //await init.Repository.AddSourceFolder(
            //    new SourceFolder
            //    {
            //        CollectionId = collection.Id,
            //        Path = "Y:\\!playgoround\\!source_folders",
            //        KeepRelativePath = false
            //    });
        }