mirror of
https://github.com/yawaflua/WebSockets.git
synced 2026-02-04 14:04:11 +02:00
Refactor WebSocket routing and error handling logic
Replaces `Dictionary` with `ConcurrentDictionary` for thread-safe WebSocket route management and improves error logging with added debug assertions. Also fixes duplicate registrations, enhances dependency injection, updates package references, and adjusts WebSocket attribute structure for better extensibility and usage.
This commit is contained in:
@@ -21,7 +21,7 @@ namespace yawaflua.WebSockets.Attributes;
|
||||
/// </remarks>
|
||||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)]
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class WebSocketAttribute : RouteAttribute, IRouteTemplateProvider, IApiDescriptionVisibilityProvider
|
||||
public class WebSocketAttribute : Attribute, IApiDescriptionVisibilityProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Original route template specified in attribute
|
||||
@@ -39,7 +39,7 @@ public class WebSocketAttribute : RouteAttribute, IRouteTemplateProvider, IApiDe
|
||||
/// - Parameters: "/user/{id}"
|
||||
/// - Constraints: "/file/{name:alpha}"
|
||||
/// - Optional: "/feed/{category?}"</param>
|
||||
public WebSocketAttribute([RouteTemplate]string path) : base(path)
|
||||
public WebSocketAttribute(string path)
|
||||
{
|
||||
Template = path;
|
||||
Name = path;
|
||||
|
||||
Reference in New Issue
Block a user