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.
This commit is contained in:
John Colvin committed 2023-08-24 04:04:39 +00:00
1 parent 0cade21f1d
commit 513bbeeaae
1 file changed
+11 -8
@@ -7,20 +7,23 @@ namespace bts {
using System;
public readonly struct SyntheticSecurityTuple(
SecurityImmutable security,
string user_name,
ExecutionStrategyImmutable? strategy
) : IEquatable<SyntheticSecurityTuple>, IComparable<SyntheticSecurityTuple>, IComparable {
public readonly struct SyntheticSecurityTuple : IEquatable<SyntheticSecurityTuple>, IComparable<SyntheticSecurityTuple>, IComparable {
public static readonly Func<SyntheticSecurityTuple, uint> 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);