diff --git a/src/client/spark/Orders/OrderSecurity.cs b/src/client/spark/Orders/OrderSecurity.cs index b3f178bd0..a0c356b63 100644 --- a/src/client/spark/Orders/OrderSecurity.cs +++ b/src/client/spark/Orders/OrderSecurity.cs @@ -56,10 +56,8 @@ namespace bts.api.orderman { public static bool operator != (OrderSecurity left, OrderSecurity right) => !left.Equals(right); } - // Note: This is a core data type in our front end, so the creation of valid data must be strictly enforced. - // - bad values here may yield weird/difficult to track bugs. - // - don't expose any constructors, if you need another way to create instances of this type, - // add another factory method and be sure to validate the arguments. + // This is a core data type on the front end, so data validation is strict, as bad values may yield weird/difficult to track bugs. + // Descriptive factory methods are favored over public constructors, as they are less likely to be misused. readonly struct OrderSecurityAlgo : IEquatable { public readonly OrderRecordImmutable order; public readonly SecurityImmutable? security; @@ -101,10 +99,8 @@ namespace bts.api.orderman { public static bool operator !=(OrderSecurityAlgo a, OrderSecurityAlgo b) => !a.Equals(b); } - // Note: This is a core data type in our front end, so the creation of valid data must be strictly enforced. - // - bad values here may yield weird/difficult to track bugs. - // - don't expose any constructors, if you need another way to create instances of this type, - // add another factory method and be sure to validate the arguments. + // This is a core data type on the front end, so data validation is strict, as bad values may yield weird/difficult to track bugs. + // Descriptive factory methods are favored over public constructors, as they are less likely to be misused. readonly struct OrderSecurityRootPair : IEquatable { public readonly OrderSecurityAlgo order; readonly OrderSecurityAlgo? _root;