Beispiel #1
0
 public void SetCharacterData(AuthorizedCharacterData data)
 {
     Assets               = new AssetsLogic(client, config, data);
     Bookmarks            = new BookmarksLogic(client, config, data);
     Calendar             = new CalendarLogic(client, config, data);
     Character            = new CharacterLogic(client, config, data);
     Clones               = new ClonesLogic(client, config, data);
     Contacts             = new ContactsLogic(client, config, data);
     Contracts            = new ContractsLogic(client, config, data);
     Corporation          = new CorporationLogic(client, config, data);
     FactionWarfare       = new FactionWarfareLogic(client, config, data);
     Fittings             = new FittingsLogic(client, config, data);
     Fleets               = new FleetsLogic(client, config, data);
     Industry             = new IndustryLogic(client, config, data);
     Killmails            = new KillmailsLogic(client, config, data);
     Location             = new LocationLogic(client, config, data);
     Loyalty              = new LoyaltyLogic(client, config, data);
     Mail                 = new MailLogic(client, config, data);
     Market               = new MarketLogic(client, config, data);
     Opportunities        = new OpportunitiesLogic(client, config, data);
     PlanetaryInteraction = new PlanetaryInteractionLogic(client, config, data);
     Search               = new SearchLogic(client, config, data);
     Skills               = new SkillsLogic(client, config, data);
     UserInterface        = new UserInterfaceLogic(client, config, data);
     Wallet               = new WalletLogic(client, config, data);
     Universe             = new UniverseLogic(client, config, data);
 }
Beispiel #2
0
 public List <KeyName> GetIndustryKeyName()
 {
     using (IndustryLogic logic = new IndustryLogic())
     {
         return(logic.GetIndustryKeyName());
     }
 }
Beispiel #3
0
 public List <IndustryEntity> GetIndustryList()
 {
     using (IndustryLogic logic = new IndustryLogic())
     {
         return(logic.GetIndustryList());
     }
 }
Beispiel #4
0
 public List <IndustryEntity> GetIndustryListReport(GetReportDataParams param, out int totalCount)
 {
     using (IndustryLogic logic = new IndustryLogic())
     {
         return(logic.GetIndustryListReport(param, out totalCount));
     }
 }
Beispiel #5
0
 public BaseObject DeleteIndustry(int id)
 {
     using (IndustryLogic logic = new IndustryLogic())
     {
         return(logic.DeleteIndustry(id));
     }
 }
Beispiel #6
0
 /// <summary>
 /// 更新行业信息
 /// </summary>
 /// <param name="param"></param>
 /// <returns></returns>
 public BaseObject UpdateIndustry(IndustryEntity param)
 {
     using (IndustryLogic logic = new IndustryLogic())
     {
         return(logic.UpdateIndustry(param));
     }
 }
Beispiel #7
0
 /// <summary>
 /// 获取行业
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public IndustryEntity GetIndustryByID(int id)
 {
     using (IndustryLogic logic = new IndustryLogic())
     {
         return(logic.GetIndustryByID(id));
     }
 }
Beispiel #8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="config"></param>
        public EsiClient(IOptions <EsiConfig> _config)
        {
            config = _config.Value;
            client = new HttpClient(new HttpClientHandler
            {
                AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate
            });

            // Enforce user agent value
            if (string.IsNullOrEmpty(config.UserAgent))
            {
                throw new ArgumentException("For your protection, please provide an X-User-Agent value. This can be your character name and/or project name. CCP will be more likely to contact you rather than just cut off access to ESI if you provide something that can identify you within the New Eden galaxy.");
            }
            else
            {
                client.DefaultRequestHeaders.Add("X-User-Agent", config.UserAgent);
            }

            client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
            client.DefaultRequestHeaders.AcceptEncoding.Add(new StringWithQualityHeaderValue("gzip"));
            client.DefaultRequestHeaders.AcceptEncoding.Add(new StringWithQualityHeaderValue("deflate"));

            SSO                  = new SsoLogic(client, config);
            Alliance             = new AllianceLogic(client, config);
            Assets               = new AssetsLogic(client, config);
            Bookmarks            = new BookmarksLogic(client, config);
            Calendar             = new CalendarLogic(client, config);
            Character            = new CharacterLogic(client, config);
            Clones               = new ClonesLogic(client, config);
            Contacts             = new ContactsLogic(client, config);
            Contracts            = new ContractsLogic(client, config);
            Corporation          = new CorporationLogic(client, config);
            Dogma                = new DogmaLogic(client, config);
            FactionWarfare       = new FactionWarfareLogic(client, config);
            Fittings             = new FittingsLogic(client, config);
            Fleets               = new FleetsLogic(client, config);
            Incursions           = new IncursionsLogic(client, config);
            Industry             = new IndustryLogic(client, config);
            Insurance            = new InsuranceLogic(client, config);
            Killmails            = new KillmailsLogic(client, config);
            Location             = new LocationLogic(client, config);
            Loyalty              = new LoyaltyLogic(client, config);
            Mail                 = new MailLogic(client, config);
            Market               = new MarketLogic(client, config);
            Opportunities        = new OpportunitiesLogic(client, config);
            PlanetaryInteraction = new PlanetaryInteractionLogic(client, config);
            Routes               = new RoutesLogic(client, config);
            Search               = new SearchLogic(client, config);
            Skills               = new SkillsLogic(client, config);
            Sovereignty          = new SovereigntyLogic(client, config);
            Status               = new StatusLogic(client, config);
            Universe             = new UniverseLogic(client, config);
            UserInterface        = new UserInterfaceLogic(client, config);
            Wallet               = new WalletLogic(client, config);
            Wars                 = new WarsLogic(client, config);
        }