Skip to content

Commit 5afb0e2

Browse files
committed
Remove IBinaryAdapter interface and IsBinaryEnabled from RemoteMarketDataDrive
Binary FIX protocol is no longer supported. Remove IBinaryAdapter, IsBinaryEnabled property, and related test/sample code.
1 parent 920bfa2 commit 5afb0e2

5 files changed

Lines changed: 1 addition & 46 deletions

File tree

Algo/Storages/RemoteMarketDataDrive.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,6 @@ public TimeSpan Timeout
195195
}
196196
}
197197

198-
/// <summary>
199-
/// Enable binary mode.
200-
/// </summary>
201-
public bool IsBinaryEnabled { get; set; }
202-
203198
/// <summary>
204199
/// Logs.
205200
/// </summary>
@@ -239,11 +234,6 @@ private RemoteStorageClient CreateClient()
239234
la.Password = Credentials.Password;
240235
}
241236

242-
if (adapter is IBinaryAdapter ba)
243-
{
244-
ba.IsBinaryEnabled = IsBinaryEnabled;
245-
}
246-
247237
adapter.Parent ??= Logs ?? ServicesRegistry.LogManager?.Application;
248238

249239
return new(adapter, SecurityBatchSize);
@@ -285,7 +275,6 @@ public override void Load(SettingsStorage storage)
285275
TargetCompId = storage.GetValue(nameof(TargetCompId), TargetCompId);
286276
SecurityBatchSize = storage.GetValue(nameof(SecurityBatchSize), SecurityBatchSize);
287277
Timeout = storage.GetValue(nameof(Timeout), Timeout);
288-
IsBinaryEnabled = storage.GetValue(nameof(IsBinaryEnabled), IsBinaryEnabled);
289278
}
290279

291280
/// <inheritdoc />
@@ -297,8 +286,7 @@ public override void Save(SettingsStorage storage)
297286
.Set(nameof(Credentials), Credentials.Save())
298287
.Set(nameof(TargetCompId), TargetCompId)
299288
.Set(nameof(SecurityBatchSize), SecurityBatchSize)
300-
.Set(nameof(Timeout), Timeout)
301-
.Set(nameof(IsBinaryEnabled), IsBinaryEnabled);
289+
.Set(nameof(Timeout), Timeout);
302290
;
303291
}
304292
}

Messages/IMessageAdapter.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -345,13 +345,3 @@ public interface ISenderTargetAdapter
345345
string TargetCompId { get; set; }
346346
}
347347

348-
/// <summary>
349-
/// Message adapter, provided <see cref="IsBinaryEnabled"/> property.
350-
/// </summary>
351-
public interface IBinaryAdapter
352-
{
353-
/// <summary>
354-
/// Enable binary mode.
355-
/// </summary>
356-
bool IsBinaryEnabled { get; set; }
357-
}

Samples/03_Storage/04_HydraServerConnect/MainWindow.xaml.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ public MainWindow()
5252
// required for non anonymous access
5353
//
5454
//Password = "hydra_user".To<SecureString>()
55-
56-
//
57-
// uncomment to enable binary mode
58-
//
59-
//IsBinaryEnabled = true,
6055
};
6156

6257
// turning off the support of the transactional messages

Samples/03_Storage/05_HydraServerSaveToLocal/Program.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ static async Task Main()
5555
//
5656
//Password = "hydra_user".To<SecureString>()
5757
},
58-
59-
//
60-
// uncomment to enable binary mode
61-
//
62-
//IsBinaryEnabled = true,
6358
};
6459

6560
var secId = new SecurityId

Tests/RemoteStorageClientTests.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,17 +1001,6 @@ public void Drive_Timeout_ThrowsOnZeroOrNegative()
10011001
IsTrue(thrown2);
10021002
}
10031003

1004-
[TestMethod]
1005-
public void Drive_IsBinaryEnabled_GetSet_Works()
1006-
{
1007-
using var drive = CreateDrive();
1008-
1009-
IsFalse(drive.IsBinaryEnabled); // default
1010-
1011-
drive.IsBinaryEnabled = true;
1012-
IsTrue(drive.IsBinaryEnabled);
1013-
}
1014-
10151004
[TestMethod]
10161005
public void Drive_Credentials_NotNull()
10171006
{
@@ -1204,7 +1193,6 @@ public void Drive_SaveLoad_PreservesSettings()
12041193
drive.TargetCompId = "CustomTarget";
12051194
drive.SecurityBatchSize = 500;
12061195
drive.Timeout = TimeSpan.FromSeconds(45);
1207-
drive.IsBinaryEnabled = true;
12081196
drive.Credentials.Email = "test@example.com";
12091197
drive.Credentials.Password = "secret".To<SecureString>();
12101198

@@ -1221,7 +1209,6 @@ public void Drive_SaveLoad_PreservesSettings()
12211209
AreEqual("CustomTarget", drive2.TargetCompId);
12221210
AreEqual(500, drive2.SecurityBatchSize);
12231211
AreEqual(TimeSpan.FromSeconds(45), drive2.Timeout);
1224-
IsTrue(drive2.IsBinaryEnabled);
12251212
AreEqual("test@example.com", drive2.Credentials.Email);
12261213
}
12271214

0 commit comments

Comments
 (0)