예제 #1
0
        public ElementScaner(ISystemElementsCollector collector, string name)
        {
            _collector = collector;

            _addedElements   = new SystemElementsCollection();
            _removedElements = new SystemElementsCollection();

            Name = name;

            GetInitialCollection();
        }
예제 #2
0
        public void RegisterElementAndCollector <T>(ISystemElementsCollector collectorToRegister)
            where T : SystemElement
        {
            //if (!collectorToRegister.GetType().IsSubclassOf(typeof(ISystemElementsCollector<T>)))
            //    throw new CollectorRegistrationException(string.Format("Object of type {0} can not be used for collecting objects of type {1} as it is not deliviered from {2}",
            //        collectorToRegister.GetType(),
            //        typeof(T),
            //        typeof(ISystemElementsCollector<T>)));

            _typesAndCollectors.Add(typeof(T), collectorToRegister);
        }