Beispiel #1
0
 /// <inheritdoc />
 public void Dispose()
 {
     Stop();
     LoggerProvider?.Dispose();
     _servers = null;
     Endpoints.Clear();
     Handlers.Clear();
 }
Beispiel #2
0
 protected void AppInit()
 {
     if (Endpoints == null)
     {
         Endpoints = new ObservableCollection <RaciEndpoint>();
     }
     else
     {
         Endpoints.Clear();
     }
     if (Endpoints == null)
     {
         Endpoints = new ObservableCollection <RaciEndpoint>();
     }
 }
Beispiel #3
0
        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;
        }
Beispiel #4
0
        // 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;
 }