当前位置: 首页>>代码示例>>C#>>正文


C# ResponseMode类代码示例

本文整理汇总了C#中ResponseMode的典型用法代码示例。如果您正苦于以下问题:C# ResponseMode类的具体用法?C# ResponseMode怎么用?C# ResponseMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ResponseMode类属于命名空间,在下文中一共展示了ResponseMode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ServerStatusAsync

        public Task<EveServiceResponse<ServerStatus>> ServerStatusAsync(ResponseMode responseMode = ResponseMode.Normal)
        {
            const string MethodPath = "{0}/ServerStatus.xml.aspx";
            const string CacheKeyFormat = "ServerStatus";

            string cacheKey = CacheKeyFormat.FormatInvariant();

            IDictionary<string, string> apiParams = new Dictionary<string, string>();

            return GetServiceResponseAsync(null, null, 0, MethodPath.FormatInvariant(RequestPrefix), apiParams, cacheKey,
                ApiConstants.SixtyMinuteCache, responseMode, ParseServerStatusResponse);
        }
开发者ID:itguy327,项目名称:EveHQ,代码行数:12,代码来源:ServerClient.cs

示例2: CalendarEventAttendees

        /// <summary>Calls the CalendarEventAttendees method on the Eve web service.</summary>
        /// <param name="keyId">API Key ID to query</param>
        /// <param name="vCode">The Verification Code for this ID</param>
        /// <param name="characterId">Character to query.</param>
        /// <param name="eventId">The eventID to query</param>
        /// <param name="responseMode"></param>
        /// <returns>A collection of attendees for the event.</returns>
        public Task<EveServiceResponse<IEnumerable<CalendarEventAttendee>>> CalendarEventAttendees(string keyId,
            string vCode, int characterId, int eventId, ResponseMode responseMode = ResponseMode.Normal)
        {
            Guard.Ensure(!keyId.IsNullOrWhiteSpace());
            Guard.Ensure(!vCode.IsNullOrWhiteSpace());
            Guard.Ensure(characterId > 0);

            const string MethodPath = "{0}/CalendarEventAttendees.xml.aspx";
            const string CacheKeyFormat = "Calendar_EventAttendees{0}_{1}_{2}";

            string cacheKey = CacheKeyFormat.FormatInvariant(keyId, characterId, eventId);

            IDictionary<string, string> apiParams = new Dictionary<string, string>();
            apiParams[ApiConstants.EventId] = eventId.ToInvariantString();

            return GetServiceResponseAsync(keyId, vCode, characterId, MethodPath.FormatInvariant(PathPrefix), apiParams,
                cacheKey, ApiConstants.SixtyMinuteCache, responseMode, ParseCalendarEventAttendeesResponse);
        }
开发者ID:wyrlwind,项目名称:EveHQ,代码行数:25,代码来源:CharacterClient.cs

示例3: CorporationSheetAsync

        public Task<EveServiceResponse<CorporateData>> CorporationSheetAsync(string keyId, string vCode, int corpId = 0,
            ResponseMode responseMode = ResponseMode.Normal)
        {
            Guard.Ensure(!keyId.IsNullOrWhiteSpace());
            Guard.Ensure(!vCode.IsNullOrWhiteSpace());

            const string MethodPath = "{0}/CorporationSheet.xml.aspx";
            const string CacheKeyFormat = "CorporationSheet{0}";

            string cacheKey = CacheKeyFormat.FormatInvariant(keyId,
                corpId > 0 ? "_{0}".FormatInvariant(corpId) : string.Empty);

            IDictionary<string, string> apiParams = new Dictionary<string, string>();
            if (corpId > 0)
            {
                apiParams["corporationID"] = corpId.ToInvariantString();
            }

            return GetServiceResponseAsync(keyId, vCode, 0, MethodPath.FormatInvariant(PathPrefix), apiParams, cacheKey,
                ApiConstants.SixtyMinuteCache, responseMode, ProcessCorporationSheetResponse);
        }
开发者ID:itguy327,项目名称:EveHQ,代码行数:21,代码来源:CorpClient.cs

示例4: SkillQueue

 /// <summary>The skill queue.</summary>
 /// <param name="keyId">The key id.</param>
 /// <param name="vCode">The v code.</param>
 /// <param name="characterId">The character id.</param>
 /// <param name="responseMode">The response Mode.</param>
 /// <returns>The <see cref="Task" />.</returns>
 public EveServiceResponse<IEnumerable<QueuedSkill>> SkillQueue(string keyId, string vCode, int characterId,
     ResponseMode responseMode = ResponseMode.Normal)
 {
     return RunAsyncMethod(SkillQueueAsync, keyId, vCode, characterId, responseMode);
 }
开发者ID:wyrlwind,项目名称:EveHQ,代码行数:11,代码来源:CorpCharBaseClient.cs

示例5: NPCStandings

 /// <summary>The npc standings.</summary>
 /// <param name="keyId">The key id.</param>
 /// <param name="vCode">The v code.</param>
 /// <param name="characterId">The character id.</param>
 /// <param name="responseMode">The response mode.</param>
 /// <returns></returns>
 public EveServiceResponse<IEnumerable<NpcStanding>> NPCStandings(string keyId, string vCode, int characterId,
     ResponseMode responseMode = ResponseMode.Normal)
 {
     return RunAsyncMethod(NPCStandingsAsync, keyId, vCode, characterId, responseMode);
 }
开发者ID:wyrlwind,项目名称:EveHQ,代码行数:11,代码来源:CorpCharBaseClient.cs

示例6: Characters

 /// <summary>
 ///     Gets the list of characters on the given account.
 /// </summary>
 /// <param name="keyId">API Key ID to query</param>
 /// <param name="vCode">The Verification Code for this ID</param>
 /// <param name="responseMode"></param>
 /// <returns>A Service Response object, containing the collection of Characters.</returns>
 public EveServiceResponse<IEnumerable<AccountCharacter>> Characters(string keyId, string vCode,
     ResponseMode responseMode = ResponseMode.Normal)
 {
     Guard.Ensure(!keyId.IsNullOrWhiteSpace());
     Guard.Ensure(!vCode.IsNullOrWhiteSpace());
     return RunAsyncMethod(CharactersAsync, keyId, vCode, responseMode);
 }
开发者ID:wyrlwind,项目名称:EveHQ,代码行数:14,代码来源:AccountClient.cs

示例7: NotificationTexts

 /// <summary>The notification texts.</summary>
 /// <param name="keyId">The key id.</param>
 /// <param name="vCode">The v code.</param>
 /// <param name="characterId">The character id.</param>
 /// <param name="notificationIds">The notification ids.</param>
 /// <param name="responseMode">The response mode.</param>
 /// <returns></returns>
 public EveServiceResponse<IEnumerable<NotificationText>> NotificationTexts(string keyId, string vCode,
     int characterId, IEnumerable<long> notificationIds, ResponseMode responseMode = ResponseMode.Normal)
 {
     return RunAsyncMethod(NotificationTextsAsync, keyId, vCode, characterId, notificationIds, responseMode);
 }
开发者ID:wyrlwind,项目名称:EveHQ,代码行数:12,代码来源:CharacterClient.cs

示例8: ServerStatus

 public EveServiceResponse<ServerStatus> ServerStatus(ResponseMode responseMode = ResponseMode.Normal)
 {
     return RunAsyncMethod(ServerStatusAsync, responseMode);
 }
开发者ID:itguy327,项目名称:EveHQ,代码行数:4,代码来源:ServerClient.cs

示例9: Blueprints

 public EveServiceResponse<IEnumerable<Entities.Blueprint>> Blueprints(string keyId, string vCode, int characterId,
     ResponseMode responseMode = ResponseMode.Normal)
 {
     return RunAsyncMethod(BlueprintsAsync, keyId, vCode, characterId, responseMode);
 }
开发者ID:warlof,项目名称:EveHQ,代码行数:5,代码来源:CorpCharBaseClient.cs

示例10: ContractItems

 /// <summary>The contract items.</summary>
 /// <param name="keyId">The key id.</param>
 /// <param name="vCode">The v code.</param>
 /// <param name="characterId">The character id.</param>
 /// <param name="contractId">The contract id.</param>
 /// <param name="responseMode">The response mode.</param>
 /// <returns></returns>
 public EveServiceResponse<IEnumerable<ContractItem>> ContractItems(string keyId, string vCode, int characterId,
     long contractId, ResponseMode responseMode = ResponseMode.Normal)
 {
     return RunAsyncMethod(ContractItemsAsync, keyId, vCode, characterId, contractId, responseMode);
 }
开发者ID:wyrlwind,项目名称:EveHQ,代码行数:12,代码来源:CorpCharBaseClient.cs

示例11: WalletTransactionsAsync

        /// <summary>The wallet transactions.</summary>
        /// <param name="keyId">The key id.</param>
        /// <param name="vCode">The v code.</param>
        /// <param name="characterId">The character id.</param>
        /// <param name="accountKey"></param>
        /// <param name="fromId">The from id.</param>
        /// <param name="rowCount">The row count.</param>
        /// <param name="responseMode">The response Mode.</param>
        /// <returns>The <see cref="Task" />.</returns>
        public Task<EveServiceResponse<IEnumerable<WalletTransaction>>> WalletTransactionsAsync(
            string keyId,
            string vCode,
            int characterId,
            int accountKey,
            long? fromId = null,
            int? rowCount = null,
            ResponseMode responseMode = ResponseMode.Normal)
        {
            Guard.Ensure(!keyId.IsNullOrWhiteSpace());
            Guard.Ensure(!vCode.IsNullOrWhiteSpace());
            Guard.Ensure(characterId > 0);
            Guard.Ensure(rowCount == null || rowCount.Value > 0);

            const string MethodPath = "{0}/WalletTransactions.xml.aspx";
            const string CacheKeyFormat = "WalletTransactions{0}_{1}{2}{3}{4}";

            const string FromId = "fromID";
            const string RowCount = "rowCount";
            const string AccountKey = "accountKey";


            IDictionary<string, string> apiParams = new Dictionary<string, string>();

            apiParams[AccountKey] = accountKey.ToInvariantString();

            if (fromId != null)
            {
                apiParams[FromId] = fromId.Value.ToInvariantString();
            }

            if (rowCount != null)
            {
                apiParams[RowCount] = rowCount.Value.ToInvariantString();
            }

            string cacheKey = CacheKeyFormat.FormatInvariant(keyId, characterId, accountKey,
                fromId.HasValue ? fromId.Value.ToInvariantString() : string.Empty,
                rowCount.HasValue ? rowCount.Value.ToInvariantString() : string.Empty);

            return GetServiceResponseAsync(keyId, vCode, characterId, MethodPath.FormatInvariant(PathPrefix), apiParams,
                cacheKey, ApiConstants.SixtyMinuteCache, responseMode, ProcessWalletTransctionResponse);
        }
开发者ID:wyrlwind,项目名称:EveHQ,代码行数:52,代码来源:CorpCharBaseClient.cs

示例12: AssetListAsync

        /// <summary>Retrieves the given character's asset list.</summary>
        /// <param name="keyId">API Key ID to query</param>
        /// <param name="vCode">The Verification Code for this ID</param>
        /// <param name="characterId">Character to query.</param>
        /// <param name="responseMode">The response Mode.</param>
        /// <returns>An enumerable collection of all items in the characters assets.</returns>
        public Task<EveServiceResponse<IEnumerable<AssetItem>>> AssetListAsync(string keyId, string vCode,
            int characterId, ResponseMode responseMode = ResponseMode.Normal)
        {
            Guard.Against(keyId.IsNullOrWhiteSpace());
            Guard.Against(vCode.IsNullOrWhiteSpace());
            Guard.Against(characterId == 0);

            const string MethodPath = "{0}/AssetList.xml.aspx";
            const string CacheKeyFormat = "Character_AssetList_{0}_{1}";

            string cacheKey = CacheKeyFormat.FormatInvariant(keyId, characterId);

            return GetServiceResponseAsync(keyId, vCode, characterId, MethodPath.FormatInvariant(PathPrefix), null,
                cacheKey, ApiConstants.SixHourCache, responseMode, ParseAssetListResponse);
        }
开发者ID:wyrlwind,项目名称:EveHQ,代码行数:21,代码来源:CorpCharBaseClient.cs

示例13: ContactList

 /// <summary>The contact list.</summary>
 /// <param name="keyId">The key id.</param>
 /// <param name="vCode">The v code.</param>
 /// <param name="characterId">The character id.</param>
 /// <param name="responseMode">The response mode.</param>
 /// <returns></returns>
 public EveServiceResponse<IEnumerable<Contact>> ContactList(string keyId, string vCode, int characterId,
     ResponseMode responseMode = ResponseMode.Normal)
 {
     return RunAsyncMethod(ContactListAsync, keyId, vCode, characterId, responseMode);
 }
开发者ID:wyrlwind,项目名称:EveHQ,代码行数:11,代码来源:CorpCharBaseClient.cs

示例14: AccountBalanceAsync

        /// <summary>Gets the balance of a character.</summary>
        /// <param name="keyId">API Key ID to query</param>
        /// <param name="vCode">The Verification Code for this ID</param>
        /// <param name="characterId">Character to query.</param>
        /// <param name="responseMode">The response Mode.</param>
        /// <returns>Account balances.</returns>
        public Task<EveServiceResponse<IEnumerable<AccountBalance>>> AccountBalanceAsync(string keyId, string vCode,
            int characterId, ResponseMode responseMode = ResponseMode.Normal)
        {
            Guard.Against(keyId.IsNullOrWhiteSpace());
            Guard.Against(vCode.IsNullOrWhiteSpace());
            Guard.Against(characterId == 0);

            const string methodPath = "{0}/AccountBalance.xml.aspx";
            const string cacheKeyFormat = "Character_AccountBalance_{0}_{1}";

            string cacheKey = cacheKeyFormat.FormatInvariant(keyId, characterId);

            return GetServiceResponseAsync(keyId, vCode, characterId, methodPath.FormatInvariant(PathPrefix), null,
                cacheKey, ApiConstants.SixtyMinuteCache, responseMode, ParseBalanceResponse);
        }
开发者ID:wyrlwind,项目名称:EveHQ,代码行数:21,代码来源:CorpCharBaseClient.cs

示例15: KillMailsAsync

        public Task<EveServiceResponse<IEnumerable<Entities.Killmail.KillMail>>> KillMailsAsync(string keyId, string vCode,
            int characterId, ResponseMode responseMode = ResponseMode.Normal)
        {
            Guard.Ensure(!keyId.IsNullOrWhiteSpace());
            Guard.Ensure(!vCode.IsNullOrWhiteSpace());
            Guard.Ensure(characterId > 0);

            const string MethodPath = "{0}/KillMails.xml.aspx";
            const string CacheKeyFormat = "{0}KillMails{1}_{2}";

            string cacheKey = CacheKeyFormat.FormatInvariant(PathPrefix, keyId, characterId);

            return GetServiceResponseAsync(keyId, vCode, characterId, MethodPath.FormatInvariant(PathPrefix), null,
                cacheKey, ApiConstants.FiveMinuteCache, responseMode, ProcessKillMailResponse);
        }
开发者ID:warlof,项目名称:EveHQ,代码行数:15,代码来源:CorpCharBaseClient.cs


注:本文中的ResponseMode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。