/// <summary> /// Activate or deactivate an endpoint /// </summary> /// <param name="endpointId"></param> /// <param name="checkedValue"></param> /// <returns></returns> private async Task SetActivationAsync(EndpointInfo endpoint) { string endpointId = endpoint.EndpointModel.Registration.Id; if (!IsEndpointActivated(endpoint)) { try { await RegistryService.ActivateEndpointAsync(endpointId); } catch (Exception e) { if (e.Message.Contains("404103")) { Status = "The endpoint is not available."; } else { Status = e.Message; } } } else { try { await RegistryService.DeactivateEndpointAsync(endpointId); } catch (Exception e) { Status = e.Message; } } }
/// <summary> /// Activate or deactivate an endpoint /// </summary> /// <param name="endpointId"></param> /// <param name="checkedValue"></param> /// <returns></returns> private async Task SetActivationAsync(EndpointInfo endpoint) { string endpointId = endpoint.EndpointModel.Registration.Id; if (!IsEndpointActivated(endpoint)) { try { await RegistryService.ActivateEndpointAsync(endpointId); } catch (Exception e) { Status = e.Message; } } else { try { await RegistryService.DeactivateEndpointAsync(endpointId); } catch (Exception e) { Status = e.Message; } } }