Пример #1
0
        private static async Task PerformOperation(DownloadRequestOptions o)
        {
            Logging.Log("Checking for updates...");

            CTAC   ctac  = new(o.ReportingSku, o.ReportingVersion, o.MachineType, o.FlightRing, o.FlightingBranchName, o.BranchReadinessLevel, o.CurrentBranch, o.ReleaseType, o.SyncCurrentVersionOnly, ContentType : o.ContentType);
            string token = string.Empty;

            if (!string.IsNullOrEmpty(o.Mail) && !string.IsNullOrEmpty(o.Password))
            {
                token = await MBIHelper.GenerateMicrosoftAccountTokenAsync(o.Mail, o.Password);
            }

            IEnumerable <UpdateData> data = await FE3Handler.GetUpdates(null, ctac, token, FileExchangeV3UpdateFilter.ProductRelease);

            data = data.Select(x => UpdateUtils.TrimDeltasFromUpdateData(x));

            foreach (UpdateData update in data)
            {
                await ProcessUpdateAsync(update, o.OutputFolder, o.MachineType, o.Language, o.Edition, true);

                //await BuildUpdateXml(update, o.MachineType);
            }
            Logging.Log("Completed.");
            if (Debugger.IsAttached)
            {
                Console.ReadLine();
            }
        }