コード例 #1
0
        public async Task <IDictionary <string, IEnumerable <Trip> > > Detect()
        {
            var tripDetector = await tripFactory.Create();

            var assetIds = (await this.assetService.ListAsync()).Select(a => a.Id);
            var dict     = new Dictionary <string, IEnumerable <Trip> >();

            foreach (var assetId in assetIds)
            {
                var result = await pipeline.ExecuteModules(tripDetector.GetModuleLoaders(), assetId);

                dict.Add(assetId, (IEnumerable <Trip>)result);
            }

            return(dict);
        }