refactor: Rename IncrementalMarketDataClient w/out Incremental
This commit is contained in:
1 parent
069ab45164
commit
e587c8dbd7
7 files changed
+16
-16
No files matched your search
+3
-3
@@ -13,15 +13,15 @@ namespace bts.md {
|
||||
using System.Linq;
|
||||
using System.Reactive.Linq;
|
||||
|
||||
public class IncrementalMarketDataClient {
|
||||
public class MarketDataClient {
|
||||
readonly MDSource _source;
|
||||
readonly TimeSpan _poll_interval;
|
||||
readonly uint _num_depth_levels;
|
||||
|
||||
public IncrementalMarketDataClient(MDSource source)
|
||||
public MarketDataClient(MDSource source)
|
||||
: this(source, 5, TimeSpan.FromSeconds(0.1)) { }
|
||||
|
||||
public IncrementalMarketDataClient(MDSource source, uint num_depth_levels, TimeSpan poll_interval) {
|
||||
public MarketDataClient(MDSource source, uint num_depth_levels, TimeSpan poll_interval) {
|
||||
_source = source;
|
||||
_poll_interval = poll_interval;
|
||||
_num_depth_levels = num_depth_levels;
|
||||
@@ -17,9 +17,9 @@ namespace bts.sdk
|
||||
|
||||
public class MarketDataSample : IDisposable
|
||||
{
|
||||
readonly IncrementalMarketDataClient _md;
|
||||
readonly MarketDataClient _md;
|
||||
readonly List<IDisposable> _disps = new List<IDisposable>();
|
||||
public MarketDataSample(IncrementalMarketDataClient client)
|
||||
public MarketDataSample(MarketDataClient client)
|
||||
{
|
||||
_md = client;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace bts.sdk
|
||||
|
||||
public class OrderSample : IDisposable
|
||||
{
|
||||
readonly IncrementalMarketDataClient _md;
|
||||
readonly MarketDataClient _md;
|
||||
readonly OrdersClient _orders_client;
|
||||
readonly List<IDisposable> _disps = new List<IDisposable>();
|
||||
IReadOnlyDictionary<uint, SecurityImmutable> _securities =
|
||||
@@ -28,7 +28,7 @@ namespace bts.sdk
|
||||
|
||||
public OrderSample(
|
||||
OrdersClient orders_client,
|
||||
IncrementalMarketDataClient md_client,
|
||||
MarketDataClient md_client,
|
||||
IObservable<IReadOnlyDictionary<uint, SecurityImmutable>> securities_src
|
||||
) {
|
||||
_orders_client = orders_client;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace bts.sdk {
|
||||
var admin_service = ctx.locate<AdminService>();
|
||||
var md_relay = ctx.locate<MarketDataRelay>();
|
||||
var md_source = new MDSource(TimeSpan.FromSeconds(0.1));
|
||||
var md_client = new IncrementalMarketDataClient(md_source);
|
||||
var md_client = new MarketDataClient(md_source);
|
||||
var admin_client = new AdminClient(admin_service, UserTuple.admin);
|
||||
var sec_resolver = new SecurityResolver(md_relay, md_source.subscribe_securities());
|
||||
var orders_client = new OrdersClient(order_service, admin_client, sec_resolver);
|
||||
|
||||
@@ -8,8 +8,8 @@ namespace bts.sdk.ui
|
||||
{
|
||||
public class UISample : IDisposable
|
||||
{
|
||||
readonly IncrementalMarketDataClient _md;
|
||||
public UISample(IncrementalMarketDataClient client)
|
||||
readonly MarketDataClient _md;
|
||||
public UISample(MarketDataClient client)
|
||||
{
|
||||
_md = client;
|
||||
}
|
||||
|
||||
@@ -96,9 +96,9 @@ namespace bts.websocket_core {
|
||||
}
|
||||
}
|
||||
|
||||
IncrementalMarketDataClient? mdClient;
|
||||
IncrementalMarketDataClient MdClient {
|
||||
get => Log.notnull<IncrementalMarketDataClient>(mdClient);
|
||||
MarketDataClient? mdClient;
|
||||
MarketDataClient MdClient {
|
||||
get => Log.notnull<MarketDataClient>(mdClient);
|
||||
set {
|
||||
Log.isnull(mdClient);
|
||||
mdClient = value;
|
||||
@@ -235,4 +235,4 @@ namespace bts.websocket_core {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ namespace bts.websocket_core {
|
||||
public IUniqueID GetID() => _id;
|
||||
|
||||
Action<Object> _sm;
|
||||
private IncrementalMarketDataClient _MdClient;
|
||||
private MarketDataClient _MdClient;
|
||||
public void SendMessage(Object _data) {
|
||||
var json = new {
|
||||
jsonrpc = 2.0,
|
||||
@@ -103,7 +103,7 @@ namespace bts.websocket_core {
|
||||
throw new ArgumentException($"{key} not correct");
|
||||
|
||||
}
|
||||
public WebsocketSubscriptionHandler(WebsocketRequest req, IncrementalMarketDataClient md, Action<Object> sm) {
|
||||
public WebsocketSubscriptionHandler(WebsocketRequest req, MarketDataClient md, Action<Object> sm) {
|
||||
_sm = sm;
|
||||
_MdClient = md;
|
||||
//_dis = ... //some code that gives a disposable;
|
||||
|
||||
Reference in new issue
Block a user