Пример #1
0
        private static async Task GetRingBuilds(GetBuildsOptions opts)
        {
            var CTACs = GetRingCTACs(opts.MachineType, opts.ReportingSku);

            foreach (var CTAC in CTACs)
            {
                var ctac = CTAC.Key;

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

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

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

                for (int i = 0; i < data.Count(); i++)
                {
                    string buildStr = await data.ToList()[i].GetBuildStringAsync();

                    if (string.IsNullOrEmpty(buildStr))
                    {
                        buildStr = data.ToList()[i].Xml.LocalizedProperties.Title;
                    }
                    Console.WriteLine($"\"{CTAC.Value}\"[{i}]=\"{buildStr}\"");
                }
            }
        }
Пример #2
0
        private static async Task PerformOperation(DownloadRequestOptions o)
        {
            Logging.Log("Checking for updates...");

            CTAC ctac = new CTAC(o.ReportingSku, o.ReportingVersion, o.MachineType, o.FlightRing, o.FlightingBranchName, o.BranchReadinessLevel, o.CurrentBranch, o.ReleaseType, o.SyncCurrentVersionOnly);
            IEnumerable <UpdateData> data = await FE3Handler.GetUpdates(null, ctac, null, 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();
            }
        }