示例#1
0
        protected virtual ProbeResultBuilder CollectInformation(CollectInfo collectInfo)
        {
            CollectedObject collectedObject    = null;
            var             probeResultBuilder = new ProbeResultBuilder();

            int idOfItems = 1;

            //  var objectsOfAnEspecificType = this.GetObjectsOfType(collectInfo.ObjectTypes);

            ObjectCollector.PrepareCollectionOfObjects(collectInfo.ObjectTypes, collectInfo.Variables);
            foreach (var ovalObject in collectInfo.ObjectTypes)
            {
                ExecutionLogBuilder.CollectingInformationFrom(ovalObject.id);

                if (this.ObjectTypeHasSet(ovalObject))
                {
                    collectedObject = this.ProcessSet(ovalObject, collectInfo);
                }
                else
                {
                    collectedObject = this.ProcessCollect(ovalObject, collectInfo, probeResultBuilder, ref idOfItems);
                }

                probeResultBuilder.AddCollectedObject(collectedObject);
            }

            return(probeResultBuilder);
        }