public void ProcessRequest(HttpContext context) { var bytes = RandomAvatarBuilder.Build(100).SetPadding(4).FixedSeed(FixedSeed, Seed).ToBytes(); context.Response.BinaryWrite(bytes); context.Response.ContentType = "image/png"; context.Response.End(); }
internal async void ProcessRequest(HttpContext context) { var bytes = RandomAvatarBuilder.Build(100) .SetPadding(4) .FixedSeed(FixedSeed, Seed) .ToBytes(); context.Response.ContentType = "image/png"; await context.Response.Body.WriteAsync(bytes, 0, bytes.Length); }