public void Handle(SymbolChanged e) { using (var session = _store.OpenSession()) { var get = session.Load <Responses.Get>(e.CurrencyId); get.Symbol = e.Symbol; session.SaveChanges(); _manager.Publish(get); } }
private void SymbolComboBox_SelectedIndexChanged(object sender, EventArgs e) { if ((string)SymbolComboBox.SelectedItem == LINE) { Symbol = SymbolType.Line; } else { Symbol = SymbolType.Dot; } SymbolChanged?.Invoke(sender, e); }
public void Handle(SymbolChanged e) { _elastic.Update <Responses.Index, Object>(x => x .Id(e.CurrencyId) .Doc(new { Symbol = e.Symbol }) .RetryOnConflict(3) .Refresh() ); var index = _elastic.Get <Responses.Index>(e.CurrencyId); _manager.Publish(index.Source); }