Ejemplo n.º 1
0
        public static DEditorStatsRequest Read(Dictionary <byte, object> par)
        {
            var res = new DEditorStatsRequest();

            res.topicId = (int)par[(byte)DiscussionParamKey.ChangedTopicId];
            return(res);
        }
Ejemplo n.º 2
0
 public static DEditorStatsRequest Read(Dictionary<byte, object> par)
 {
     var res = new DEditorStatsRequest();
     res.topicId = (int) par[(byte) DiscussionParamKey.ChangedTopicId];
     return res;
 }
Ejemplo n.º 3
0
        public DEditorStatsResponse CollectStats(DEditorStatsRequest req)
        {
            var res = default(DEditorStatsResponse);

            res.NumClusteredBadges = 0;
            res.ListOfClusterIds = new int[_clusters.Values.Count()];

            //record clusters
            int i = 0;
            foreach (var cluster in _clusters.Values)
            {
                res.NumClusteredBadges += cluster.GetClusterables().Count();
                res.ListOfClusterIds[i++] = cluster.GetId();
            }

            //record links
            res.ListOfLinkIds = new int[_forwardEdges.Count()];
            i = 0;
            foreach (var edge in _forwardEdges.Values)
            {
                res.ListOfLinkIds[i++] = edge.linkShapeId;
            }

            res.NumClusters = _clusters.Count();

            res.NumLinks = _forwardEdges.Count();

            return res;
        }