Beispiel #1
0
        public static AmpSecurity GetSecurityById(long securityId)
        {
            var securityRm = new AmpSecurityListRm(() => _getListener(nameof(AmpSecurityListRm)));
            var security   = (from sec in securityRm.Securities.Values
                              where sec.LegacySecurityId == securityId
                              select sec).SingleOrDefault();

            return(security);
        }
Beispiel #2
0
        public static AmpSecurity GetSecurityByName(string securityName)
        {
            var securityRm = new AmpSecurityListRm(() => _getListener(nameof(AmpSecurityListRm)));
            var security   = (from sec in securityRm.Securities.Values
                              where sec.Name == securityName.Trim()
                              select sec).SingleOrDefault();

            return(security);
        }