private static void ProcessAppsSate(AppsHash appsState, ServiceItem service)
 {
     foreach (KeyValuePair <string, AppInfoEx> entry in appsState)
     {
         entry.Value.Weight = (entry.Value.ServiceName == _serviceConfig.GetServiceName()) ? 0 : _servicesCollector.GetServiceWeight(entry.Value.ServiceName);
         AppInfoStorageController.CheckAndSetAppInfo(entry.Value, _serviceConfig.GetServiceAddress(), service.Url);
     }
 }
        public void Post(Contracts.StateChangedEvent stateEvent)
        {
            Console.WriteLine("Receive info app from " + stateEvent.ServiceName);
            ResetService(stateEvent.ServiceName);
            var serviceName = _serviceConfig.GetServiceAddress();

            if (AppInfoStorageController.NeedUpdate(stateEvent.AppState.Hash, stateEvent.AppState.Time, serviceName, stateEvent.ServiceName))
            {
                SendGetAppInfoRequest(stateEvent);
            }
        }