-
Can is use async/await inside of for example calling a REST api and reading the content as string: stream.Select("get content", async context => await context.httpClient.GetStringAsync(context.url)); |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I will work on an example asap... |
Beta Was this translation helpful? Give feedback.
-
Just for your information, an extension dedicated for REST makes part of my plans. |
Beta Was this translation helpful? Give feedback.
-
The reason why async methods are not handled too gracefully is because for now, I chose that operators are the only ones who control when what is sent. Internally, many processes are parallelized, but inside these threads elements are handled sequentially. So I would end up making a For the in-memory file, you must wrap your Stream into a Here is how to do it: [...]
myBlobStream // let's suppose `myBlobStream` emits instances of objects like { BlobStream: System.IO.Stream, FileName: string}
.Select("Create File Value", elt => FileValue.Create(elt.BlobStream, elt.FileName, "<give a name that permits to know the source of your file>"))
.CrossApplyFlatFile([...])
[...] |
Beta Was this translation helpful? Give feedback.
Just for your information, an extension dedicated for REST makes part of my plans.
But to answer your question,
????Async().Result
should work properly.You must know that ETL.NET 100% thread safe (that was even the most painful part of its development 😄 !!!)