public ICollection <IFolderMetadata> GetFolders(int parentFolderID = 0) { this.Logger.WriteFormatMessage("GetFolders: начало операции. parentFolderID={0}", parentFolderID); DBCollection <FolderMetadata> resultFolders = this.FolderAdapter.GetFolders(String.Format("[ParentID] = {0}", parentFolderID)); this.Logger.WriteMessage("GetFolders: конец операции."); return(resultFolders.Cast <IFolderMetadata>().ToList()); }
public ICollection <IStorageMetadata> GetStorages() { this.Logger.WriteMessage("GetStorages: Получение всех хранилищ"); IEnumerable <int> ids = null; DBCollection <StorageMetadata> storages = this.StorageAdapter.GetStorages(ids); this.Logger.WriteMessage("GetStorages: Получение всех хранилищ завершено."); return(storages.Cast <IStorageMetadata>().ToList()); }
public ICollection <IStorageMetadata> GetStorages(IEnumerable <int> storageIDs) { if (storageIDs == null) { throw new ArgumentNullException("storageIDs"); } this.Logger.WriteFormatMessage("GetStorages: начало. Идентификаторы: [{0}]", String.Join(",", storageIDs.Select(x => x.ToString()).ToArray <string>())); DBCollection <StorageMetadata> storages = this.StorageAdapter.GetStorages(storageIDs); this.Logger.WriteMessage("GetStorages: Получение хранилищ завершено."); return(storages.Cast <IStorageMetadata>().ToList()); }
public ICollection <IFolderMetadata> GetFolders(ICollection <string> folderUrls) { if (folderUrls == null) { throw new ArgumentNullException("folderUrls"); } this.Logger.WriteFormatMessage("GetFolders: начало операции. folderUrls=[{0}]", String.Join(",", folderUrls.ToArray())); DBCollection <FolderMetadata> resultFolders = this.FolderAdapter.GetFolders(String.Format("[Url] in ({0})", String.Join(",", folderUrls.Select(x => String.Format("N'{0}'", x)).ToArray()))); this.Logger.WriteMessage("GetFolders по folderUrls конец операции."); return(resultFolders.Cast <IFolderMetadata>().ToList()); }