Пример #1
0
 public void Add(GroupValue value_Renamed)
 {
     elements.Add(value_Renamed);
 }
 private void readMessageAndAssertEquals(GroupValue msg1)
 {
     GroupValue readMessage = decoder.ReadMessage();
     Assert.AreEqual(msg1, readMessage);
 }
Пример #3
0
        public static Message NewAllocInstrctn(String id, int side,
            double quantity, double averagePrice, GroupValue instrument,
            SequenceValue allocations)
        {
            var allocInstrctn = new Message(AllocationInstruction());
            allocInstrctn.SetFieldValue(1, allocations);
            allocInstrctn.SetFieldValue(2, instrument);
            allocInstrctn.SetFieldValue(3, new StringValue(id));
            allocInstrctn.SetFieldValue(4, new IntegerValue(side));
            allocInstrctn.SetFieldValue(5, new DecimalValue(quantity));
            allocInstrctn.SetFieldValue(6, new DecimalValue(averagePrice));

            return allocInstrctn;
        }
Пример #4
0
        private bool Equals(GroupValue other)
        {
            if (values.Length != other.values.Length)
            {
                return false;
            }

            for (var i = 0; i < values.Length; i++)
            {
                if (values[i] == null)
                {
                    if (other.values[i] != null)
                        return false;
                }
                else if (!values[i].Equals(other.values[i]))
                {
                    return false;
                }
            }

            return true;
        }