Skip to content

Instantly share code, notes, and snippets.

View r4nc1d's full-sized avatar

Jacques r4nc1d

  • Software Architect
  • Capetown, South Africa
View GitHub Profile
public class BitstampApiException : Exception
{
// https://www.bitstamp.net/api/#section/Response-codes
public BitstampApiException(string method, string message, string code)
: base("BitstampClient@" + method + " - " + message + " - " + code)
{
Code = code;
}
public string Code { get; set; }
public class RateLimitMiddleware
{
private readonly RequestDelegate next;
private readonly IDistributedCache distributedCache;
private readonly IHostingEnvironment hostingEnvironment;
public RateLimitMiddleware(RequestDelegate next, IDistributedCache distributedCache, IHostingEnvironment hostingEnvironment)
{
this.next = next;