.Net wrapper for services hosted on https://api.systemexit.co.uk/ & https://kitsu.systemexit.co.uk/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SysEx.Net/SysEx.Net.Tests/Program.cs

41 lines
902 B

using System;
using System.Drawing;
using System.IO;
using System.Threading.Tasks;
namespace SysEx.Net.Tests
{
class Program
{
static void Main(string[] args) => MainTask().GetAwaiter().GetResult();
static async Task MainTask()
{
try
{
var client = new SysExClient();
var resp = await client.GetMemeImageAsync();
if(resp is Stream)
{
Console.Write("Got Successfully");
}
var re = resp as MemoryStream;
Image img = Image.FromStream(re);
img.Save(AppContext.BaseDirectory + "image.jpg");
Console.ReadLine();
}
catch(Exception ex)
{
Console.WriteLine(ex);
}
await Task.Delay(-1);
}
}
}