private static string GetCorrelationUrl(this IServeWebSockets service, ShortGuid correlationId) { return $"{service.BaseUri}{correlationId.GetCorrelationEndpoint()}"; }
public static void RemoveCorrelationService(this IServeWebSockets service, ShortGuid correlationId) { service.Server.RemoveWebSocketService(correlationId.GetCorrelationEndpoint(leadingForwardSlash: true)); }
public static bool IsCorrelationService(this IServeWebSockets service, ShortGuid correlationId) { var endpoint = correlationId.GetCorrelationEndpoint(leadingForwardSlash: true); var isService = service.Server.WebSocketServices.Paths.Any(x => string.Equals(x, endpoint, StringComparison.OrdinalIgnoreCase)); return isService; }
public static void AddCorrelationService(this IServeWebSockets service, ShortGuid correlationId) { service.Server.AddWebSocketService(correlationId.GetCorrelationEndpoint(leadingForwardSlash: true), () => new Correlation(correlationId)); }