/// <summary>Adds or updates the requested endpoint.</summary> /// <param name="endpointUid"> The endpoint UID.</param> /// <param name="endpointType">Type of the endpoint.</param> /// <param name="url"> URL of the resource.</param> /// <param name="clientUid"> (Optional) The client UID.</param> public static void AddOrUpdate( Guid endpointUid, EndpointInformation.EndpointChannelType endpointType, string url, Guid?clientUid = null) { _instance._AddOrUpdate(endpointUid, endpointType, url, clientUid); }
/// <summary>Adds or updates an endpoint.</summary> /// <remarks>Gino Canessa, 7/26/2019.</remarks> /// <param name="endpointUid"> The endpoint UID.</param> /// <param name="endpointType">Type of the endpoint.</param> /// <param name="urlPart"> The URL part.</param> /// <param name="clientUid"> (Optional) The client UID.</param> private void _AddOrUpdate( Guid endpointUid, EndpointInformation.EndpointChannelType endpointType, string urlPart, Guid?clientUid = null) { EndpointInformation endpoint = new EndpointInformation(endpointUid, endpointType, urlPart); _uidEndpointDict[endpointUid] = endpoint; if (!string.IsNullOrEmpty(urlPart)) { _urlPartEndpointDict[urlPart] = endpoint; } Console.WriteLine($"Created endpoint >>>{endpointUid}<<< total: {_endpointClientsDict.Count}"); if ((clientUid != null) && (clientUid != Guid.Empty)) { _RegisterClientForEndpoint((Guid)clientUid, endpointUid); Console.WriteLine($"Added endpoint >>>{endpointUid}<<< to client: >>>{clientUid}<<<"); } }