From 09a6d60620514d29562741368a6a45efa578850d Mon Sep 17 00:00:00 2001 From: MaleDong Date: Mon, 30 Jul 2018 09:56:25 +0800 Subject: [PATCH] Change from `async Task` to `Task` Because the async is the wrapper of Task, we don't need to use async again. --- binding/c#/IP2Region/DBSearcher.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/binding/c#/IP2Region/DBSearcher.cs b/binding/c#/IP2Region/DBSearcher.cs index 1c1f6d2..4ac822b 100644 --- a/binding/c#/IP2Region/DBSearcher.cs +++ b/binding/c#/IP2Region/DBSearcher.cs @@ -388,24 +388,24 @@ namespace IP2Region /// /// Get the region throught the ip address with memory binary search algorithm. /// - public async Task AsyncMemorySearch(string ip) + public Task AsyncMemorySearch(string ip) { - return await Task.FromResult(MemorySearch(ip)); + return Task.FromResult(MemorySearch(ip)); } /// /// Get the region throught the ip address with b-tree search algorithm. /// - public async Task AsyncBtreeSearch(string ip) + public Task AsyncBtreeSearch(string ip) { - return await Task.FromResult(BtreeSearch(ip)); + return Task.FromResult(BtreeSearch(ip)); } /// /// Get the region throught the ip address with binary search algorithm. /// - public async Task AsyncBinarySearch(string ip) + public Task AsyncBinarySearch(string ip) { - return await Task.FromResult(BinarySearch(ip)); + return Task.FromResult(BinarySearch(ip)); } #endregion