Пример #1
0
        public Task <IList <ObjectCountInfo> > GetInfos()
        {
            var simpleJson       = SimpleJson.Resolve();
            var simpleJsonFile   = SimpleJson.ResolveSimpleJsonFile();
            var simpleLogFactory = SimpleLogFactory.Resolve();

            var objectCountInfos = ObjectCountInfo.Create(ObjectCounter.Instance);

            return(Task.FromResult(objectCountInfos));
        }
Пример #2
0
        public static IList <ObjectCountInfo> Create(ObjectCounter counter)
        {
            var infos = new List <ObjectCountInfo>();

            foreach (var item in counter.Items)
            {
                var theType = item.Key;
                var info    = new ObjectCountInfo();
                info.Name  = theType.FullName;
                info.Count = item.Value;
                infos.Add(info);
            }
            return(infos);
        }