Ejemplo n.º 1
0
    private void FetchClientInformationFromServer() {
      Guid clientId = ClientInformationUtils.GetUniqueMachineId();

      try {
        AccessClient.CallAccessService(x => clientInfo = x.GetClient(clientId));
        if (clientInfo != null) {
          clientExists = true;
          clientInfo.HeuristicLabVersion = ClientInformationUtils.GetHLVersion();
          AccessClient.CallAccessService(x => x.UpdateClient(clientInfo));
        }
        errorOccured = false;
        occuredException = null;
      }
      catch (MessageSecurityException e) {
        //wrong username or password
        clientExists = false;
        errorOccured = true;
        occuredException = e;
      }
      catch (Exception e) {
        clientExists = false;
        errorOccured = true;
        occuredException = e;
      }
    }
Ejemplo n.º 2
0
 private void GenerateLocalClientConfig() {
   clientExists = true;
   errorOccured = false;
   occuredException = null;
   clientInfo = new Client();
   clientInfo.Id = ClientInformationUtils.GetUniqueMachineId();
 }
Ejemplo n.º 3
0
 protected Client(Client original, Cloner cloner)
   : base(original, cloner) {
   this.HeuristicLabVersion = original.HeuristicLabVersion;
   this.MemorySize = original.MemorySize;
   this.Timestamp = original.Timestamp;
   this.NumberOfCores = original.NumberOfCores;
   this.ProcessorType = original.ProcessorType;
   this.ClientType = original.ClientType;
   this.OperatingSystem = original.OperatingSystem;
   this.ClientConfiguration = original.ClientConfiguration;
   this.Country = original.Country;
   this.PerformanceValue = original.PerformanceValue;
 }
    public static Client CollectClientInformation() {
      Client client = new Client();
      OperatingSystem os = new OperatingSystem();
      ClientType cType = new ClientType();
      cType.Name = Settings.Default.ClientTypeName;

      client.Id = GetUniqueMachineId();
      client.HeuristicLabVersion = GetHLVersion();
      client.Name = GetMachineName();
      client.MemorySize = GetPhysicalMemory().GetValueOrDefault();
      client.NumberOfCores = GetNumberOfCores();
      os.Name = GetOperatingSystem();
      client.OperatingSystem = os;
      client.ProcessorType = GetCpuInfo();
      client.ClientType = cType;
      client.ClientConfiguration = GetClientConfiguration();
      client.Timestamp = DateTime.Now;
      client.PerformanceValue = RunBenchmark();

      return client;
    }