Esempio n. 1
0
        private List <Underlying> GenerateUnderlyingInfos(COMUnderlyingInfos comUnderlyingInfos)
        {
            List <Underlying> underlyings = new List <Underlying>();

            if (comUnderlyingInfos != null)
            {
                foreach (COMUnderlying comUdl in comUnderlyingInfos.GetValues)
                {
                    underlyings.Add(new Underlying()
                    {
                        SourceType  = (EnumUnderlyingSourceType)Enum.Parse(typeof(EnumUnderlyingSourceType), comUdl.SourceType.ToString()),
                        ProductType = (EnumUnderlyingProductType)Enum.Parse(typeof(EnumUnderlyingProductType), comUdl.ProductType.ToString()),
                        Code        = comUdl.Code
                    });
                }
            }

            return(underlyings);
        }
Esempio n. 2
0
 // Add a public contructor to init properties.
 public COMTrade()
 {
     Trade            = new Trade();
     _underlyingInfos = new COMUnderlyingInfos();
 }