Beispiel #1
0
        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
        }
Beispiel #2
0
 public void Handle(RequestSelectingEndpoint message)
 {
     if (ServiceControlRoot.EndpointExists(message.Endpoint))
     {
         var node = ServiceControlRoot.GetEndpointNode(message.Endpoint);
         SelectedNode = node;
     }
 }