Esempio n. 1
0
        private async void Button_OneDrive_OnClick(object sender, RoutedEventArgs e)
        {
            displayLog("---- Graph clicked ----");

            var drives = await graphService.GetDrivesAsync(displayLog);

            foreach (var drive in drives)
            {
                displayLog($"drive found: {drive.Name} - {drive.DriveType}");

                var items = await graphService.GetDriveItemsAsync(drive.Id, displayLog);

                if (items == null)
                {
                    continue;
                }

                foreach (var item in items)
                {
                    displayLog($"{item.Id} - {item.Name} - {item.Size}");
                }
            }

            displayLog("finsihed onedrive flow");
        }
    public override async void OnInputClicked(InputClickedEventData eventData)
    {
        updateTextContent("graph event received");
        var drives = await graphService.GetDrivesAsync(updateTextContent);

        updateTextContent($"{drives?.Count()} drives found");
        foreach (var drive in drives)
        {
            var item = await graphService.GetDriveItemsAsync(drive.Id, updateTextContent);
        }
    }