private Security GetSecurityBySecCode(string secCode) { var sfxSecurity = new SfxSecurity { SlotID = _slot.ID, SecCode = secCode }; sfxSecurity.Load().ThrowIfNeed(LocalizedStrings.Str3704); secCode = sfxSecurity.SecCode; var secBoard = ExchangeBoard.GetBoard(sfxSecurity.SecBoard); var id = SecurityIdGenerator.GenerateId(secCode, secBoard); return(GetSecurity(id, name => { var security = EntityFactory.CreateSecurity(name); security.Board = secBoard; security.Code = secCode; return security; }, security => false)); }
private Security GetSecurityBySecCode(string secCode) { var sfxSecurity = new SfxSecurity { SlotID = _slot.ID, SecCode = secCode }; sfxSecurity.Load().ThrowIfNeed(LocalizedStrings.Str3704); secCode = sfxSecurity.SecCode; var secBoard = ExchangeBoard.GetBoard(sfxSecurity.SecBoard); var id = SecurityIdGenerator.GenerateId(secCode, secBoard); return null; //return GetSecurity(id, name => //{ // var security = EntityFactory.CreateSecurity(name); // security.Board = secBoard; // security.Code = secCode; // return security; //}, security => false); }