diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2021-11-29 17:12:56 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2021-11-29 17:12:56 +0300 |
commit | 2afcbbf08c21aa7368361269f24240147aa79a00 (patch) | |
tree | 9f6494fb2f70d086059619c0dce6316b338b69ca /Functions.cs | |
parent | d176a023f06d70cb577e64d1a917e77d677d2a2b (diff) |
Организация директорий проекта
Diffstat (limited to 'Functions.cs')
-rw-r--r-- | Functions.cs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/Functions.cs b/Functions.cs deleted file mode 100644 index 6792195..0000000 --- a/Functions.cs +++ /dev/null @@ -1,21 +0,0 @@ -using AngleSharp.Dom; -using ExcelDna.Integration; -using System.Net.Http; -using System.Threading.Tasks; - -namespace Rehau.Sku.Assist -{ - public class Functions - { - private static HttpClient httpClient = new HttpClient(); - - [ExcelFunction] - public static async Task<string> RAUNAME(string request) - { - Task<string> contentTask = Task.Run(() => SkuAssist.GetContent(request, httpClient)); - Task<IDocument> documentTask = await contentTask.ContinueWith(content => SkuAssist.GetDocument(content)); - IProduct product = await documentTask.ContinueWith(doc => SkuAssist.GetProductFromDocument(doc.Result)); - return product == null ? ExcelError.ExcelErrorNull.ToString() : product.ToString(); - } - } -}
\ No newline at end of file |