/// <summary> /// Exports the contracts. /// </summary> /// <returns></returns> /// <remarks>Excludes contracts that appear in both collections.</remarks> private IEnumerable <SerializableContract> ContractsExport() { // Until we can determine what data the character's API keys can query, // we have to keep the data unprocessed. Once we know, we filter them IEnumerable <SerializableContract> corporationContractsExport = EveMonClient.ESIKeys.Any(apiKey => !apiKey.IsProcessed) || m_corporationDataQuerying != null ? CorporationContracts.ExportOnlyIssuedByCharacter() : new List <SerializableContract>(); IEnumerable <SerializableContract> characterContractsExport = EveMonClient.ESIKeys.Any(apiKey => !apiKey.IsProcessed) || m_characterDataQuerying != null ? CharacterContracts.Export().Where(charContract => corporationContractsExport.All( corpContract => corpContract.ContractID != charContract.ContractID)) : new List <SerializableContract>(); return(characterContractsExport.Concat(corporationContractsExport)); }
internal AuthCharacterMain(ESIEve EasyEve) : base(EasyEve) { EasyObject = (ESIEve.Authenticated)EasyEve; Assets = new CharacterAssets(EasyObject); Bookmarks = new CharacterBookmarks(EasyObject); Calendar = new CharacterCalendar(EasyObject); Clones = new CharacterClones(EasyObject); Contacts = new CharacterContacts(EasyObject); Contracts = new CharacterContracts(EasyObject); FactionWarfare = new CharacterFactionWarfare(EasyObject); Fittings = new CharacterFittings(EasyObject); Fleet = new CharacterFleet(EasyObject); Industry = new CharacterIndustry(EasyObject); Killmails = new CharacterKillMails(EasyObject); Location = new CharacterLocation(EasyObject); Loyalty = new CharacterLoyalty(EasyObject); Mail = new CharacterMail(EasyObject); Market = new CharacterMarket(EasyObject); Opportunities = new CharacterOpportunities(EasyObject); PlanetaryInteraction = new CharacterPlanetaryInteraction(EasyObject); Skills = new CharacterSkills(EasyObject); Wallet = new CharacterWallet(EasyObject); }
/// <summary> /// Imports the contracts. /// </summary> /// <param name="contracts">The contracts.</param> private void ContractsImport(IList <SerializableContract> contracts) { CharacterContracts.Import(contracts.Where(contract => contract.IssuedFor == IssuedFor.Character)); CorporationContracts.Import(contracts.Where(contract => contract.IssuedFor == IssuedFor.Corporation)); }