Exemplo n.º 1
0
        public static ProcessMetric FromObject(object obj)
        {
            if (obj == null)
            {
                return(null);
            }
            JsonObject json = new JsonObject(obj);

            return(new ProcessMetric()
            {
                pid = json.Int32("pid"),
                type = json.String("type"),
                memory = MemoryInfo.FromObject(json["memory"]),
                cpu = CPUUsage.FromObject(json["cpu"])
            });
        }