From 513bbeeaae08efbb3b8507c025262cf567f9e046 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Thu, 24 Aug 2023 03:45:55 +0000 Subject: [PATCH] fix build (api serv linux): Revert primary ctr syntax This is a new feat in cs lang version 12, which is only in preview mode. Reverting the syntax change bc I couldn't get it to build on Linux. --- .../spark_api/MarketData/SyntheticTuple.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/client/spark_api/MarketData/SyntheticTuple.cs b/src/client/spark_api/MarketData/SyntheticTuple.cs index bf8ff150f..9acc80682 100644 --- a/src/client/spark_api/MarketData/SyntheticTuple.cs +++ b/src/client/spark_api/MarketData/SyntheticTuple.cs @@ -7,20 +7,23 @@ namespace bts { using System; - public readonly struct SyntheticSecurityTuple( - SecurityImmutable security, - string user_name, - ExecutionStrategyImmutable? strategy - ) : IEquatable, IComparable, IComparable { + public readonly struct SyntheticSecurityTuple : IEquatable, IComparable, IComparable { public static readonly Func key_fn = a => a.security.Id; - public SecurityImmutable security { get; } = security; - public string user_name { get; } = user_name; + public SyntheticSecurityTuple( + SecurityImmutable security, string user_name, ExecutionStrategyImmutable? strategy) { + this.security = security; + this.user_name = user_name; + this.strategy = strategy; + } + + public SecurityImmutable security { get; } + public string user_name { get; } public UserTuple user => security.HasSynthetic ? new(security.Synthetic.UserId, user_name) : throw new InvalidOperationException("Security not of type Synthetic"); - public ExecutionStrategyImmutable? strategy { get; } = strategy; + public ExecutionStrategyImmutable? strategy { get; } public int CompareTo(SyntheticSecurityTuple other) => SecurityComparer.compare(security, other.security);