public void RefreshData() { if (ServiceControlRoot == null) { TryReconnectToServiceControl(); } if (ServiceControlRoot == null) { return; } var endpoints = serviceControl.GetEndpoints(); if (endpoints == null) { return; } ServiceControlRoot.Children.Clear(); var endpointInstancesGroupedByName = endpoints.OrderBy(x => x.Name).GroupBy(x => x.Name); foreach (var scaledOutEndpoint in endpointInstancesGroupedByName) { var instances = scaledOutEndpoint.ToList(); var hostNames = instances.Select(instance => instance.HostDisplayName).Distinct(); var tooltip = string.Join(", ", hostNames); ServiceControlRoot.Children.Add(new AuditEndpointExplorerItem(instances.First(), tooltip)); } }
public async Task RefreshData() { if (ServiceControlRoot == null) { await TryReconnectToServiceControl(); } if (ServiceControlRoot == null) { return; //TODO: DO we need to check twice? Root node should have been added at this stage. } var endpoints = await _serviceControl.GetEndpoints(); if (endpoints == null) { return; } foreach (var endpoint in endpoints.OrderBy(e => e.Name)) { if (!ServiceControlRoot.EndpointExists(endpoint)) { ServiceControlRoot.Children.Add(new AuditEndpointExplorerItem(endpoint)); } } //TODO: Remove non-existing endpoints efficiently }
private async Task RefreshEndpoints() { var endpoints = await _serviceControl.GetEndpoints(); if (endpoints == null) { return; } foreach (var endpoint in endpoints) { if (!ServiceRoot.EndpointExists(endpoint)) { ServiceRoot.Children.Add(new AuditEndpointExplorerItem(endpoint)); } } }
public void RefreshData() { if (ServiceControlRoot == null) { TryReconnectToServiceControl(); } if (ServiceControlRoot == null) { return; } var endpoints = serviceControl.GetEndpoints(); if (endpoints == null) { return; } ServiceControlRoot.Children.Clear(); foreach (var endpoint in endpoints.OrderBy(e => e.Name)) { ServiceControlRoot.Children.Add(new AuditEndpointExplorerItem(endpoint)); } }