public void LoadActiveSet() { ClientAdapterResponse response = SendRpc(new GetActiveSet( )); // // Iterate through each overnight position // foreach (PositionOvernightData overnight_position in response.DealingResponse.PositionList) { positionManager.Add(new OvernightPosition(overnight_position)); } // // Iterate through each order message // foreach (OrderMessage order in response.DealingResponse.OrderList) { if (order.HasOrderData) { Order o = new Order(order.OrderData); foreach (AllocationData data in order.AllocationDataList) { o.AddAllocation(new Allocation(data)); } // // Add the order to the active set // activeSet.Update(o); } // // Get the releases... // foreach (ReleaseData data in order.ReleaseDataList) { activeSet.Update(new Release(data)); } // // Get the executions... // foreach (ExecutionData data in order.ExecutionDataList) { activeSet.Update(new Execution(data)); } } }