Ejemplo n.º 1
0
 public static IDrivesCollectionPage GetFacade(IUserDrivesCollectionPage graphpage)
 {
     if (graphpage == null)
     {
         return(null);
     }
     else
     {
         FacadeUserDrivesCollectionPage newpage = new FacadeUserDrivesCollectionPage();
         newpage._page = graphpage;
         return(newpage);
     }
 }
Ejemplo n.º 2
0
        public IEnumerable <Drive> GetDrives(User user)
        {
            IUserDrivesCollectionPage drives = null;

            try
            {
                drives = graphClient.Users[user.Id].Drives.Request().GetAsync().Result;
            }
            catch
            {
                log.Warn("Could not get Drives for User " + user.DisplayName);
            }
            if (drives != null)
            {
                log.Info("Got Drives for User" + user.DisplayName);
                foreach (var drive in drives)
                {
                    yield return(drive);
                }
            }
        }