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:
John Colvin committed 2024-10-30 19:30:29 +00:00
1 parent 5426ba0aa7
commit 60a52b3922
34 files changed
+839 -817

No files matched your search

@@ -38,7 +38,7 @@ namespace bts {
sub_msg.serialize_into_str(str);
str.Position = 0;
var sub_msg_desered = new SubscribeMsg();
sub_msg_desered.consruct_deserialize(str);
sub_msg_desered.construct_deserialize(str);
Assert.That(sub_msg_desered.connection, Is.EqualTo(sub_msg.connection));
Assert.That(sub_msg_desered.subscribing_app, Is.EqualTo(sub_msg.subscribing_app));
compare_arrays(sub_msg.tags, sub_msg_desered.tags);
@@ -57,7 +57,7 @@ namespace bts {
unsub_msg.serialize_into_str(str);
str.Position = 0;
var sub_msg_desered = new SubscribeMsg();
sub_msg_desered.consruct_deserialize(str);
sub_msg_desered.construct_deserialize(str);
Assert.That(sub_msg_desered.connection, Is.EqualTo(unsub_msg.connection));
Assert.That(sub_msg_desered.subscribing_app, Is.EqualTo(unsub_msg.subscribing_app));
compare_arrays<string>(unsub_msg.tags, sub_msg_desered.tags);
@@ -80,7 +80,7 @@ namespace bts {
pub_msg.serialize_into_str(str);
str.Position = 0;
PublishMsg pub_msg_desered = new PublishMsg();
pub_msg_desered.consruct_deserialize(str);
pub_msg_desered.construct_deserialize(str);
Assert.That(pub_msg_desered.connection, Is.EqualTo(pub_msg.connection));
Assert.That(pub_msg_desered.publishing_app, Is.EqualTo(pub_msg.publishing_app));
Assert.That(pub_msg_desered.tag, Is.EqualTo(pub_msg.tag));
@@ -102,7 +102,7 @@ namespace bts {
ps_server_msg.serialize_into_str(str);
PubSubServerMessage ps_server_msg_desered = new PubSubServerMessage();
str.Position = 0;
ps_server_msg_desered.consruct_deserialize(str);
ps_server_msg_desered.construct_deserialize(str);
Assert.That(ps_server_msg_desered.tag, Is.EqualTo(ps_server_msg.tag));
Assert.That(ps_server_msg_desered.tag_type, Is.EqualTo(ps_server_msg.tag_type));
compare_arrays(ps_server_msg.data, ps_server_msg_desered.data);
@@ -125,7 +125,7 @@ namespace bts {
msg.serialize_into_str(str);
PubSubClientMessage msg_deser = new PubSubClientMessage();
str.Position = 0;
msg_deser.consruct_deserialize(str);
msg_deser.construct_deserialize(str);
Assert.That(msg_deser.msg_type, Is.EqualTo(msg.msg_type));
Assert.That(msg_deser.sub_msg, Is.EqualTo(msg.sub_msg));
}