コード例 #1
0
        public async Task <object> Get()
        {
            SetAntiForgeryTokens();

            IEnumerable <ApiKey> keys = await _keyProvider.GetAllKeys();

            // Set HTTP header for total count
            Context.Response.SetItemsCount(keys.Count());

            return(new {
                api_keys = keys.Select(k => ApiKeyHelper.ToJsonModel(k))
            });
        }
コード例 #2
0
 private async Task <IEnumerable <ApiKey> > GetAllKeys()
 {
     return((await _keyProvider.GetAllKeys()).OrderBy(k => k, _comparer));
 }
コード例 #3
0
 private IEnumerable <ApiKey> GetAllKeys()
 {
     return(_keyProvider.GetAllKeys().OrderBy(k => k, _comparer));
 }