public void Update(RTAssetsInfo asset) { int index = -1; index = Assets.FindIndex(a => a.Symbol == asset.Symbol); if (index != null && index != -1) { Assets[index].Close = asset.Close; Assets[index].High = asset.High; Assets[index].Last = asset.Last; Assets[index].Low = asset.Low; Assets[index].Open = asset.Open; Assets[index].Position = asset.Position; Assets[index].Symbol = asset.Symbol; Assets[index].Time = asset.Time; Assets[index].Trades = asset.Trades; Assets[index].Variation = asset.Variation; Assets[index].Volume = asset.Volume; } }
public void Add(RTAssetsInfo asset) { Assets.Add(asset); }