1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-19 20:33:03 +00:00

Added unit tests, added solution, added travis build

This commit is contained in:
JKorf
2018-03-07 10:32:57 +01:00
parent 27fb92f999
commit 94eb269ade
29 changed files with 339 additions and 0 deletions
@@ -0,0 +1,11 @@
using CryptoExchange.Net.RateLimiter;
namespace CryptoExchange.Net.Interfaces
{
public interface IExchangeClient
{
IRequestFactory RequestFactory { get; set; }
void AddRateLimiter(IRateLimiter limiter);
void RemoveRateLimiters();
}
}
+23
View File
@@ -0,0 +1,23 @@
using System;
using System.IO;
using System.Net;
using System.Threading.Tasks;
namespace CryptoExchange.Net.Interfaces
{
public interface IRequest
{
Uri Uri { get; }
WebHeaderCollection Headers { get; set; }
string Method { get; set; }
void SetProxy(string host, int port);
string ContentType { get; set; }
string Accept { get; set; }
long ContentLength { get; set; }
Task<Stream> GetRequestStream();
Task<IResponse> GetResponse();
}
}
@@ -0,0 +1,7 @@
namespace CryptoExchange.Net.Interfaces
{
public interface IRequestFactory
{
IRequest Create(string uri);
}
}
@@ -0,0 +1,9 @@
using System.IO;
namespace CryptoExchange.Net.Interfaces
{
public interface IResponse
{
Stream GetResponseStream();
}
}