private GetImportEntriesResults GetUserImportEntries() { Dictionary <string, string> extraAttributes = new Dictionary <string, string>(); List <CSEntryChange> csentries = new List <CSEntryChange>(); bool moreToImport = false; extraAttributes.Add("company", _customersInfoEnumerator.Current.Key); csentries.AddRange(_usersEnumerator.Current.Items.Select(u => GetCsEntryChange(u, u.Id, "user", extraAttributes))); _usersEnumerator.Next(); if (_usersEnumerator.HasValue) { moreToImport = true; } else { if (_customersInfoEnumerator.MoveNext()) { _setupUsersEnumerators = true; moreToImport = true; } } return(new GetImportEntriesResults(string.Empty, moreToImport, csentries)); }
private GetImportEntriesResults GetCustomerImportEntries() { List <CSEntryChange> csentries = new List <CSEntryChange>(); bool moreToImport; // Add the connector space objects for customers obtained using the Partner Center API. csentries.AddRange( _customersEnumerator.Current.Items.Select(c => GetCsEntryChange(c, c.CompanyProfile, c.Id, "customer"))); // Add all of the customer identifiers from the current page of records to the collection. foreach (Customer c in _customersEnumerator.Current.Items) { _customersInfo.Add(c.CompanyProfile.CompanyName, c.Id); } // Move to the next page of customers. _customersEnumerator.Next(); moreToImport = _setupCustomerIdsEnumerator || _customersEnumerator.HasValue; return(new GetImportEntriesResults(string.Empty, moreToImport, csentries)); }