Exemplo n.º 1
0
 public object RenameFolder(object folderId, string newTitle)
 {
     if ("/".Equals(MakePath(folderId)))
     {
         //It's root folder
         SharpBoxDaoSelector.RenameProvider(SharpBoxProviderInfo, newTitle);
         //rename provider customer title
         var folder = GetFolderById(folderId);
         return(MakeId(folder));
     }
     else
     {
         //rename folder
         var folder = GetFolderById(folderId);
         if (SharpBoxProviderInfo.Storage.RenameFileSystemEntry(folder, newTitle))
         {
             //Folder data must be already updated by provider
             //We can't search google folders by title because root can have multiple folders with the same name
             //var newFolder = SharpBoxProviderInfo.Storage.GetFileSystemObject(newTitle, folder.Parent);
             return(MakeId(folder));
         }
     }
     return(folderId);
 }
Exemplo n.º 2
0
 protected SharpBoxDaoBase(SharpBoxDaoSelector.SharpBoxInfo sharpBoxInfo, SharpBoxDaoSelector sharpBoxDaoSelector)
 {
     SharpBoxProviderInfo = sharpBoxInfo.SharpBoxProviderInfo;
     PathPrefix           = sharpBoxInfo.PathPrefix;
     SharpBoxDaoSelector  = sharpBoxDaoSelector;
 }
Exemplo n.º 3
0
 public SharpBoxFolderDao(SharpBoxDaoSelector.SharpBoxInfo sharpBoxInfo, SharpBoxDaoSelector sharpBoxDaoSelector)
     : base(sharpBoxInfo, sharpBoxDaoSelector)
 {
 }
Exemplo n.º 4
0
 public SharpBoxFileDao(SharpBoxDaoSelector.SharpBoxInfo providerInfo, SharpBoxDaoSelector sharpBoxDaoSelector)
     : base(providerInfo, sharpBoxDaoSelector)
 {
 }