18 using System.Collections.Generic;
65 if(positions.Count == 1)
67 var position = positions.First();
70 Tuple.Create(position.Symbol, position.UnitQuantity)
76 UnitQuantities = positions.OrderBy(x => x.Symbol).Select(p => Tuple.Create(p.Symbol, p.UnitQuantity)).ToList();
90 positions[i] =
new Position(unitQuantity.Item1, 0m, unitQuantity.Item2);
100 if (ReferenceEquals(
null, other))
105 if (ReferenceEquals(
this, other))
119 if (ReferenceEquals(
null, obj))
124 if (ReferenceEquals(
this, obj))
146 return $
"{string.Join("|
", UnitQuantities.Select(x => $"{x.Item1}:{x.Item2.Normalize()}
"))}";
154 return Equals(left, right);
162 return !
Equals(left, right);