cleanup: Fix numerous build warnings in DataStreamSuite
Nearly all warnings were due to nullability issues, since the concept of nullable reference types did not exist when the DataStream code was originally written. * PubSubClientMessage - Normalize indentation/whitespace - Fix some typos - Address nullability issues to fix build warnings - Modernize code * Compression related files - ZipEntry - ZipFile - ZipInputStream - TarHeader * RemoteMessage - make 'message' nullable to resolve warnings elsewhere (in calling code) * PubSubSingleTagStateEvent.cs * PubSubMessageReactor * PubSubState * SystemHeartbeatPublisher * SystemStatsPublisher * SingleTagData * ManagedTCPMessageHub * PubsubDeserializationController * PublisherCore * InflaterHuffmanTree * AsyncTCPConnection_APM * ThreadSafeQueue * ManagedSubscriber * SubscriberCore * PubSubServerManagedTCPConnection * AsyncTCPConnection_APM * SuperMapStream * MapStream * TradeBarsStream
This commit is contained in:
1 parent
5426ba0aa7
commit
60a52b3922
34 files changed
+839
-817
No files matched your search
@@ -27,7 +27,7 @@ namespace BCG {
|
||||
private SyncQueue<byte[]> _in_data_queue = new SyncQueue<byte[]>();
|
||||
private HashSet<string> _tags = new HashSet<string>();
|
||||
|
||||
public event PubSubConnectionChange onPubSubConnectionChange;
|
||||
public event PubSubConnectionChange? onPubSubConnectionChange;
|
||||
|
||||
public SingleServerSubscriberCore(RemoteConnectionInfo server_rci, PubSubServerConnectionFactory connection_factory) {
|
||||
bts.Log.Gen.info($"SingleServerSubscriberCore constructed for server_url: {server_rci}");
|
||||
@@ -42,17 +42,17 @@ namespace BCG {
|
||||
_connection.doWork();
|
||||
//List<bts.PubSubServerMessage> rv = new List<bts.PubSubServerMessage>();
|
||||
List<byte[]> conn_data = _in_data_queue.dequeueMultipleElements(TimeSpan.Zero, 1024); // TODO, max_elements
|
||||
if (conn_data.Count() > 0) {
|
||||
if (conn_data.Count > 0) {
|
||||
bts.Log.Gen.info($"SingleServerSubscriberCore.get_updates n_updates: {conn_data.Count}");
|
||||
}
|
||||
List<bts.PubSubServerMessage> rv = new List<bts.PubSubServerMessage>();
|
||||
foreach (var m in conn_data) {
|
||||
var msg = new PubSubServerMessage();
|
||||
msg.consruct_deserialize(m);
|
||||
if (_tags.Contains(msg.tag))
|
||||
msg.construct_deserialize(m);
|
||||
if (_tags.Contains(msg.tag)) {
|
||||
rv.Add(msg);
|
||||
else {
|
||||
Log.Gen.warn("SingleSeverSubsciberCore.get_updates msg: {msg} does not have a subscription");
|
||||
} else {
|
||||
Log.Gen.warn($"SingleServerSubscriberCore.get_updates msg: {msg} does not have a subscription");
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
|
||||
Reference in new issue
Block a user