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:
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user