Exemple #1
0
        public IEnumerable <User> Get(Config c)
        {
            c.OrgsWithPATs = AzDevOpsReader.LoadAllOrgsFromPAT(c).Result.ToArray();

            List <User> result = new List <User>();

            foreach (var orgWithPAT in c.OrgsWithPATs)
            {
                foreach (var org in orgWithPAT.Orgs)
                {
                    var ur = new UserReader(org, orgWithPAT.Pat);
                    result.AddRange(ur.ReadUsers().Result);

                    //foreach(var usr in resultsUsers.Values)

                    //tasksLicenseSummaries.Add(ur.ReadLicenseSummary());
                    //tasksEntities.Add(ur.ReadEntity());
                    //internalStakeholdersCount[org] = 0;
                    //internalBasicsCount[org] = 0;
                    //internalTestsCount[org] = 0;
                    //internalVSCount[org] = 0;
                }
            }
            return(result);
        }
Exemple #2
0
        private static void ReadUsers(Config c)
        {
            c.OrgsWithPATs = AzDevOpsReader.LoadAllOrgsFromPAT(c).Result.ToArray();

            var result = AzDevOpsReader.ReadUsers(c);

            var wb = new XLWorkbook();

            foreach (var key in result.Result.Keys)
            {
                var ws = wb.Worksheets.Add("Users - " + key);

                DataTable table;
                result.Result.TryGetValue(key, out table);

                var insertedTable = ws.Cell(1, 1).InsertTable(table);

                ws.Columns().AdjustToContents();
            }
            wb.SaveAs("Users.xlsx");
        }