예제 #1
0
        /*public ClientHealthCheckResults AnalyzeClientData(CollectedData collectedData)
         * {
         *  return new ClientHealthCheckResults(collectedData.ClientInfo.HardwareInfo);
         * }*/

        /*public Task Result(string hoba)
         * {
         *  CollectedData collectedData = JsonConvert.DeserializeObject<CollectedData>(hoba);
         *  return Clients.All.SendAsync("result", AnalyzeClientData(collectedData).GetGeneralStatus().ToString());
         * }*/
        /*
         * public async void GetComputersInfo(string group)
         * {
         *  await Clients.Group(group).SendAsync("getComputerInfo");
         * }
         * public Task JoinGroup(string group)
         * {
         *  return Groups.AddToGroupAsync(Context.ConnectionId, group);
         * }*/
        public Task test(string json)
        {
            CollectedData  collectedData = JsonConvert.DeserializeObject <CollectedData>(json);
            HealthAnalyser analyser      = new HealthAnalyser();

            analyser.CheckAllProblems(collectedData.ClientInfo.HardwareInfo);
            return(Clients.All.SendAsync("test", json));
        }
예제 #2
0
        public void OnClientData(CollectedData clientData)
        {
            string clientName = clientData.ClientInfo.ClientName;

            collectedData[clientName] = clientData;

            HealthAnalyser healthAnalyser = new HealthAnalyser();

            healthAnalyser.CheckAllProblems(clientData.ClientInfo.HardwareInfo);
            healthAnalyser.AnalyseGeneralStatus();
        }
예제 #3
0
        public void GetJsonData(string jsonData)
        {
            CollectedData collectedData = JsonConvert.DeserializeObject <CollectedData>(jsonData);

            this.OnClientData(collectedData);
        }