public static async Task <WebDiskSpaceInformation> ProcessAsync(IOwinContext context, string id)
        {
            if (!ServiceRegistration.IsRegistered <ITvProvider>())
            {
                throw new BadRequestException("GetRecordingDiskInformationForCard: ITvProvider not found");
            }

            IList <ICard> cards = await TVAccess.GetTunerCardsAsync(context);

            return(DiskSpaceInformation.GetSpaceInformation(cards.Select(card => Card(card)).Single(x => x.Id == int.Parse(id)).RecordingFolder));
        }
        public static async Task <IList <WebDiskSpaceInformation> > ProcessAsync(IOwinContext context)
        {
            if (!ServiceRegistration.IsRegistered <ITvProvider>())
            {
                throw new BadRequestException("GetAllRecordingDiskInformation: ITvProvider not found");
            }

            var cards = await TVAccess.GetTunerCardsAsync(context);

            return(cards.Select(card => Card(card)).Select(x => x.RecordingFolder).Distinct().AsQueryable()
                   .Select(x => DiskSpaceInformation.GetSpaceInformation(x))
                   .GroupBy(x => x.Disk, (key, list) => list.First())
                   .ToList());
        }
 public static Task <IList <WebDiskSpaceInformation> > ProcessAsync(IOwinContext context)
 {
     return(Task.FromResult <IList <WebDiskSpaceInformation> >(DriveInfo.GetDrives().Select(x => DiskSpaceInformation.GetSpaceInformation(x.Name)).ToList()));
 }