コード例 #1
0
        public async Task <IMarginTradingWatchList> AddAsync(IMarginTradingWatchList watchList)
        {
            await _tableStorage.InsertOrReplaceAsync(MarginTradingWatchListEntity.Create(watchList));

            var entity =
                await _tableStorage.GetDataAsync(MarginTradingWatchListEntity.GeneratePartitionKey(watchList.ClientId),
                                                 MarginTradingWatchListEntity.GenerateRowKey(watchList.Id));

            return(MarginTradingWatchList.Create(entity));
        }
コード例 #2
0
 private WatchListContract Convert(IMarginTradingWatchList wl)
 {
     return(new WatchListContract
     {
         Id = wl.Id,
         Name = wl.Name,
         Order = wl.Order,
         ReadOnly = wl.ReadOnly,
         AssetIds = wl.AssetIds
     });
 }
コード例 #3
0
 public static MarginTradingWatchList Create(IMarginTradingWatchList src)
 {
     return(new MarginTradingWatchList
     {
         Id = src.Id,
         ClientId = src.ClientId,
         AssetIds = src.AssetIds,
         Order = src.Order,
         Name = src.Name,
         ReadOnly = src.ReadOnly
     });
 }
コード例 #4
0
 public static MarginTradingWatchListEntity Create(IMarginTradingWatchList src)
 {
     return(new MarginTradingWatchListEntity
     {
         PartitionKey = GeneratePartitionKey(src.ClientId),
         RowKey = GenerateRowKey(src.Id),
         Id = src.Id,
         ClientId = src.ClientId,
         Name = src.Name,
         ReadOnly = src.ReadOnly,
         Order = src.Order,
         AssetIds = string.Join(",", src.AssetIds)
     });
 }