コード例 #1
0
        public async Task <IActionResult> Index(string name)
        {
            var drive = await _explorer.GetDriveByName(name);

            ViewBag.DriveName = name;
            var children = await _explorer.GetDriveRoot(drive.Id);

            var items = children.Select(item => DriveItemViewModel.Create(item, drive.Id));

            return(View("Folder", items));
        }
コード例 #2
0
        public async Task <IActionResult> Folders(string name, string id)
        {
            var drive = await _explorer.GetDriveByName(name);

            var folderItems = await _client.Me.Drives[drive.Id].Items[id].Children
                              .Request()
                              .GetAsync();

            var models = folderItems.Select(item => DriveItemViewModel.Create(item, drive.Id));

            return(View("Folder", models));
        }