コード例 #1
0
        public static void UpdateComponentReferences(List <ComponentMessage> _messages, ComponentFactory _comp_factory)
        {
            if (_messages == null)
            {
                return;
            }
            if (_messages.Count == 0)
            {
                return;
            }
            if (_comp_factory == null)
            {
                return;
            }

            Debug.WriteLine("CB: calling 'UpdateComponentReferences' for all {0} transferred components...", _messages.Count);
            List <long>         comp_ids     = _messages.Select(x => x.CompID).ToList();
            List <List <long> > ref_comp_ids = _messages.Select(x => new List <long>(x.CompRefIds)).ToList();

            _comp_factory.AdjustRefComponentDependencies(comp_ids, ref_comp_ids);
        }