public BackupBaseFileSystem(BackupProfileData profile)
        {
            m_Profile  = profile;
            m_IStorage = profile.GetStorageInterface();
            m_Logger   = profile.Logger;

            m_BackupSessionHistory = new BackupSessionHistory(profile.GetStorageInterface());
        }
Beispiel #2
0
        internal static String TestPlatforms()
        {
            IStorageInterface si = DependencyService.Get <IStorageInterface>();

            if (si != null)
            {
                return(si.TestPlatforms("DOES THIS WORK?"));
            }
            return("SORRY, This didn't work at all");
        }
Beispiel #3
0
        internal async static Task <byte[]> ReadBytesAsync(string path)
        {
            IStorageInterface si = DependencyService.Get <IStorageInterface>();

            if (si != null)
            {
                return(await si.ReadBytesAsync(path));
            }
            return("SORRY, This didn't work at all".ToByteArray());
        }
Beispiel #4
0
        internal async static Task <string> ReadStringAsync(string path)
        {
            IStorageInterface si = DependencyService.Get <IStorageInterface>();

            if (si != null)
            {
                return(await si.ReadStringAsync(path));
            }
            return("SORRY, This didn't work at all");
        }
Beispiel #5
0
        public BackupBase(BackupProfileData profile, GenericStatusBarView progressBar) : base(profile)
        {
            m_TimeStamp = DateTime.Now;
            m_Profile   = profile;
            m_IStorage  = profile.GetStorageInterface();
            m_Logger    = profile.Logger;

            m_SourceBackupPathList = profile.BackupFolderList.ToList();//.Where(i => i.IsAvailable).ToList();
            m_TargetBackupPath     = profile.GetTargetBackupFolder();

            m_ProgressBar = progressBar;
        }
Beispiel #6
0
        internal async static Task <bool> WriteStringPickLocationAsync(string content, string name)
        {
            IStorageInterface si = DependencyService.Get <IStorageInterface>();

            if (si != null)
            {
                await si.WriteStringPickLocationAsync(content, name);

                return(true);
            }
            return(false);
        }
Beispiel #7
0
        internal async static Task <bool> DeleteFile(string path)
        {
            IStorageInterface si = DependencyService.Get <IStorageInterface>();

            if (si != null)
            {
                await si.DeleteFile(path);

                return(true);
            }
            return(false);
        }
Beispiel #8
0
        internal async static Task <bool> ShareFileString(string content, string name)
        {
            IStorageInterface si = DependencyService.Get <IStorageInterface>();

            if (si != null)
            {
                await si.ShareFileString(content, name);

                return(true);
            }
            return(false);
        }
Beispiel #9
0
        internal async static Task <bool> WriteStringAsync(string path, string content)
        {
            IStorageInterface si = DependencyService.Get <IStorageInterface>();

            if (si != null)
            {
                await si.WriteStringAsync(path, content);

                return(true);
            }
            //return "SORRY, This didn't work at all";
            return(false);
        }
Beispiel #10
0
 public BackupItemsTreeBase()
 {
     m_IStorage = ProjectData.CurrentBackupProfile.GetStorageInterface();
 }
 public FavouritesManager(PlatformSpecificHandler platformHandler)
 {
     this.storage    = platformHandler.StorageInterface;
     this.fileReader = platformHandler.FileReader;
     favourites      = this.GetStoredString();
 }
Beispiel #12
0
 public BackupSessionHistory(IStorageInterface storage)
 {
     m_Storage = storage;
 }