Adding Entity guides, flowcharts, better sample system. (#2054)
* initial * Interaction glossary entry * Sharded Interaction sample * Renames into solution * Debugging samples * Modify target location for webhookclient * Finalizing docs work, resolving docfx errors. * Adding threaduser to user chart * Add branch info to readme. * Edits to user chart * Resolve format for glossary entries * Patch sln target * Issue with file naming fixed * Patch 1/x for builds * Appending suggestions
This commit is contained in:
20
samples/TextCommandFramework/Services/PictureService.cs
Normal file
20
samples/TextCommandFramework/Services/PictureService.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TextCommandFramework.Services
|
||||
{
|
||||
public class PictureService
|
||||
{
|
||||
private readonly HttpClient _http;
|
||||
|
||||
public PictureService(HttpClient http)
|
||||
=> _http = http;
|
||||
|
||||
public async Task<Stream> GetCatPictureAsync()
|
||||
{
|
||||
var resp = await _http.GetAsync("https://cataas.com/cat");
|
||||
return await resp.Content.ReadAsStreamAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user