Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/23/15 11:53:17 (9 years ago)
Author:
ascheibe
Message:

#2496 improved information shown in error dialog

Location:
trunk/sources/HeuristicLab.Clients.Hive/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/HiveServiceLocator.cs

    r12012 r13060  
    3636    }
    3737
    38     private HiveServiceLocator() {
    39     }
     38    private HiveServiceLocator() { }
    4039
    4140    private string username;
     
    5453
    5554    public string WorkingEndpoint { get; private set; }
     55
     56
     57    public string GetEndpointInformation() {
     58      string message = "Configured endpoints: " + Environment.NewLine;
     59
     60      var configurations = Settings.Default.EndpointConfigurationPriorities;
     61      foreach (var endpointConfigurationName in configurations) {
     62        var cl = ClientFactory.CreateClient<HiveServiceClient, IHiveService>(endpointConfigurationName);
     63        message += endpointConfigurationName + ": " + cl.Endpoint.Address + Environment.NewLine;
     64      }
     65
     66      if (string.IsNullOrEmpty(WorkingEndpoint)) {
     67        message += "No working endpoint found, check you configuration.";
     68      } else {
     69        message += "Used endpoint: " + WorkingEndpoint;
     70      }
     71
     72      return message;
     73    }
    5674
    5775    private HiveServiceClient NewServiceClient() {
  • trunk/sources/HeuristicLab.Clients.Hive/3.3/IHiveServiceLocator.cs

    r12012 r13060  
    2828    void CallHiveService(Action<IHiveService> call);
    2929    T CallHiveService<T>(Func<IHiveService, T> call);
     30
     31    string GetEndpointInformation();
    3032  }
    3133}
Note: See TracChangeset for help on using the changeset viewer.