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);