/// <summary> /// Deprecated Method for adding a new object to the OrderStatus EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToOrderStatus(OrderStatus orderStatus) { base.AddObject("OrderStatus", orderStatus); }
/// <summary> /// Create a new OrderStatus object. /// </summary> /// <param name="id">Initial value of the ID property.</param> /// <param name="name">Initial value of the Name property.</param> public static OrderStatus CreateOrderStatus(global::System.Int32 id, global::System.String name) { OrderStatus orderStatus = new OrderStatus(); orderStatus.ID = id; orderStatus.Name = name; return orderStatus; }
public static string GeneratePartitionAsAllOrders(OrderStatus status) { return status.ToString(); }
public async Task<IEnumerable<OrderBase>> GetOrdersByStatusAsync(OrderStatus orderStatus) { var partitionKey = OrderEntity.GeneratePartitionAsAllOrders(orderStatus); var entities = await _tableStorage.GetDataAsync(partitionKey); return entities.Select(itm => itm.GetOrder()); }
public async Task<IEnumerable<OrderBase>> GetOrderByStatusAsync(OrderStatus orderStatus, string asset) { var partitionKey = OrderEntity.GeneratePartitionAsAllOrders(orderStatus); var result = await _tableStorage.ScanAndGetList(partitionKey, itm => { var order = itm.GetOrder() as LimitOrder; if (order == null) return false; return order.Asset == asset; }); return result.Select(itm => itm.GetOrder()); }
public async Task<IEnumerable<LimitOrder>> GetLimitOrdersByStatusAsync(OrderStatus orderStatus) { var partitionKey = OrderEntity.GeneratePartitionAsAllOrders(orderStatus); var result = new List<LimitOrder>(); await _tableStorage.GetDataByChunksAsync(partitionKey, chunk => result.AddRange(chunk.Select(orderEntity => orderEntity.GetOrder()).OfType<LimitOrder>())); return result; }
/// <summary> /// Create a new OrderStatus object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="status">Initial value of the Status property.</param> public static OrderStatus CreateOrderStatus(global::System.Int32 id, global::System.String status) { OrderStatus orderStatus = new OrderStatus(); orderStatus.Id = id; orderStatus.Status = status; return orderStatus; }