Пример #1
0
        void ProcessTask(Task task)
        {
            Step = String.Concat("Retrieving Funds List for Product ", task.product.Name, " ...");


            StepType    = false;
            ProgressPct = 0;

            serviceadapter.GetFundsByProductCode(task.product.Code,
                                                 (result) =>
            {
                OLife olife = result.Result;

                Total = olife.Items.Count();

                task.Total = Total;

                foreach (InvestmentProduct investproduct in olife.Items)
                {
                    SourceLookup lookup = new SourceLookup()
                    {
                        SourceType = SourceTypes.Silica_FundCode,
                        SourceId   = investproduct.InvestProductSysKey[0].Replace("Compass_FundCode{", "").Replace("}", ""),
                    };

                    //Only for dev purposes until the live feed is up
                    lookup.ProductCode = investproduct.ProductCode;

                    serviceadapter.AddRequest(lookup);
                }
            });
        }