aboutsummaryrefslogtreecommitdiff
path: root/src/ExcelDNA/Functions.cs
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2021-11-29 21:24:44 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2021-11-29 21:24:44 +0300
commit3ea18ae25e98527aa85835c9221ea01b36560b33 (patch)
treeca5ffb4f60b1c1b683e9094cec44d9431d3d1bb6 /src/ExcelDNA/Functions.cs
parentf3b6bfcd3e13519f648c3975d19b8f1d48130059 (diff)
Add Uri Converter
Diffstat (limited to 'src/ExcelDNA/Functions.cs')
-rw-r--r--src/ExcelDNA/Functions.cs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/ExcelDNA/Functions.cs b/src/ExcelDNA/Functions.cs
deleted file mode 100644
index ec9c607..0000000
--- a/src/ExcelDNA/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