From 9e9bb5ebfd78b69c32ae2499055dc5ce06266e83 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Mon, 1 Jul 2019 15:42:27 -0500 Subject: [PATCH] ren generic type param --- .../Core/Interfaces/IUrlsRepository.cs | 2 +- .../Infrastructure/Repositories/UrlsRepository.cs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/FilterLists.Agent/Core/Interfaces/IUrlsRepository.cs b/src/FilterLists.Agent/Core/Interfaces/IUrlsRepository.cs index d7d352533..f3f8a7270 100644 --- a/src/FilterLists.Agent/Core/Interfaces/IUrlsRepository.cs +++ b/src/FilterLists.Agent/Core/Interfaces/IUrlsRepository.cs @@ -6,6 +6,6 @@ namespace FilterLists.Agent.Core.Interfaces { public interface IUrlsRepository { - Task> GetAllAsync(); + Task> GetAllAsync(); } } \ No newline at end of file diff --git a/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs b/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs index 175c99b46..1abb23e1e 100644 --- a/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs +++ b/src/FilterLists.Agent/Infrastructure/Repositories/UrlsRepository.cs @@ -18,20 +18,20 @@ public UrlsRepository(IFilterListsApiClient apiClient) _apiClient = apiClient; } - public async Task> GetAllAsync() + public async Task> GetAllAsync() { - var endpoint = BuildEndpoint(); + var endpoint = BuildEndpoint(); var request = new RestRequest(endpoint); - var response = await _apiClient.ExecuteAsync>(request); + var response = await _apiClient.ExecuteAsync>(request); return response.SelectMany(r => r.GetType().GetProperties().Where(p => p.GetType() == typeof(Uri)).Select(p => (Uri)p.GetValue(r))) .Where(u => u != null); } - private static string BuildEndpoint() + private static string BuildEndpoint() { string endpointSuffix; - switch (typeof(TEntityUrls).Name) + switch (typeof(TModel).Name) { case nameof(SyntaxUrls): endpointSuffix = "es"; @@ -44,7 +44,7 @@ private static string BuildEndpoint() break; } - return $"{typeof(TEntityUrls).Name.Replace("Urls", endpointSuffix).ToLowerInvariant()}/seed"; + return $"{typeof(TModel).Name.Replace("Urls", endpointSuffix).ToLowerInvariant()}/seed"; } } } \ No newline at end of file