/// <inheritdoc /> public void Dispose() { Stop(); LoggerProvider?.Dispose(); _servers = null; Endpoints.Clear(); Handlers.Clear(); }
protected void AppInit() { if (Endpoints == null) { Endpoints = new ObservableCollection <RaciEndpoint>(); } else { Endpoints.Clear(); } if (Endpoints == null) { Endpoints = new ObservableCollection <RaciEndpoint>(); } }
private void PopulateEndpoints(IReadOnlyCollection <MigoEndpoint> endpoints) { var selected = SelectedEndpoint; Endpoints.Clear(); if (selected.IsValid()) { Endpoints.Add(selected); } foreach (var endpoint in endpoints) { if (endpoint.Equals(selected)) { continue; } Endpoints.Add(endpoint); } SelectedEndpoint = selected; }
// public async Task<IActionResult> OnPostAsync() public IActionResult OnPost() { if (ModelState.IsValid) { Endpoints.Clear(); try{ if (OpcUaServerUrl == null || OpcUaServerUrl == String.Empty) { Endpoints = MyUaClient.GetEndpoints(new Uri("opc.tcp://localhost:4840")); } else { Endpoints = MyUaClient.GetEndpoints(new Uri(OpcUaServerUrl)); } } catch (Exception e) { System.Console.WriteLine(e.Message); } return(Page()); } return(RedirectToPage("/Index")); }
public void ClearEndpoints() { SelectedEndpoint = null; Endpoints.Clear(); ShowNoResultsMessage = true; }