/// <summary>
 /// </summary>
 /// <param name="folderItems"></param>
 public FolderContentWrapper(DataWrapper folderItems)
 {
     Files = folderItems.Entries.OfType<File>().Select(x => new FileWrapper(x)).ToList();
     Folders = folderItems.Entries.OfType<Folder>().Select(x => new FolderWrapper(x)).ToList();
     Current = new FolderWrapper(folderItems.FolderInfo);
     PathParts = folderItems.FolderPathParts.Select(x => new { key = x.Key, path = x.Value });
 }
Exemplo n.º 2
0
 /// <summary>
 /// </summary>
 /// <param name="folderItems"></param>
 public FolderContentWrapper(DataWrapper folderItems)
 {
     Files     = folderItems.Entries.OfType <File>().Select(x => new FileWrapper(x)).ToList();
     Folders   = folderItems.Entries.OfType <Folder>().Select(x => new FolderWrapper(x)).ToList();
     Current   = new FolderWrapper(folderItems.FolderInfo);
     PathParts = folderItems.FolderPathParts.Select(x => new { key = x.Key, path = x.Value });
 }
Exemplo n.º 3
0
 /// <summary>
 /// </summary>
 /// <param name="folderItems"></param>
 public FolderContentWrapper(DataWrapper folderItems)
 {
     Files     = folderItems.Entries.OfType <File>().Select(x => new FileWrapper(x)).ToList();
     Folders   = folderItems.Entries.OfType <Folder>().Select(x => new FolderWrapper(x)).ToList();
     Current   = new FolderWrapper(folderItems.FolderInfo);
     PathParts = folderItems.FolderPathParts;
     Total     = folderItems.Total;
 }
 /// <summary>
 /// </summary>
 /// <param name="folderItems"></param>
 public FolderContentWrapper(DataWrapper folderItems)
 {
     Files = folderItems.Entries.OfType<File>().Select(x => new FileWrapper(x)).ToList();
     Folders = folderItems.Entries.OfType<Folder>().Select(x => new FolderWrapper(x)).ToList();
     Current = new FolderWrapper(folderItems.FolderInfo);
     PathParts = folderItems.FolderPathParts;
     Total = folderItems.Total;
 }
        /// <summary>
        /// </summary>
        /// <param name="folderItems"></param>
        /// <param name="startIndex"></param>
        public FolderContentWrapper(DataWrapper folderItems, int startIndex)
        {
            Files     = folderItems.Entries.OfType <File>().Select(x => new FileWrapper(x)).ToList();
            Folders   = folderItems.Entries.OfType <Folder>().Select(x => new FolderWrapper(x)).ToList();
            Current   = new FolderWrapper(folderItems.FolderInfo);
            PathParts = folderItems.FolderPathParts;

            StartIndex = startIndex;
            Count      = Files.Count + Folders.Count;
            Total      = folderItems.Total;
        }
Exemplo n.º 6
0
 /// <summary>
 /// </summary>
 /// <returns></returns>
 public static FolderContentWrapper GetSample()
 {
     return(new FolderContentWrapper()
     {
         Current = FolderWrapper.GetSample(),
         Files = new List <FileWrapper>(new[] { FileWrapper.GetSample(), FileWrapper.GetSample() }),
         Folders = new List <FolderWrapper>(new[] { FolderWrapper.GetSample(), FolderWrapper.GetSample() }),
         PathParts = new
         {
             key = "Key",
             path = "//path//to//folder"
         }
     });
 }
Exemplo n.º 7
0
        /// <summary>
        /// </summary>
        /// <returns></returns>
        public static FolderContentWrapper <int> GetSample()
        {
            return(new FolderContentWrapper <int>
            {
                Current = FolderWrapper <int> .GetSample(),
                Files = new List <FileWrapper <int> >(new[] { FileWrapper <int> .GetSample(), FileWrapper <int> .GetSample() }),
                Folders = new List <FileEntryWrapper>(new[] { FolderWrapper <int> .GetSample(), FolderWrapper <int> .GetSample() }),
                PathParts = new
                {
                    key = "Key",
                    path = "//path//to//folder"
                },

                StartIndex = 0,
                Count = 4,
                Total = 4,
            });
        }
 /// <summary>
 /// </summary>
 /// <returns></returns>
 public static FileOperationWraper GetSample()
 {
     return(new FileOperationWraper
     {
         Id = Guid.NewGuid().ToString(),
         OperationType = FileOperationType.Move,
         Progress = 100,
         //Source = "folder_1,file_1",
         //Result = "folder_1,file_1",
         Error = "",
         Processed = "1",
         Files = new List <FileWrapper> {
             FileWrapper.GetSample()
         },
         Folders = new List <FolderWrapper> {
             FolderWrapper.GetSample()
         }
     });
 }