Class WebSocketGroupAttribute

Namespace
Kuestenlogik.Bowire.Protocol.WebSocket
Assembly
Kuestenlogik.Bowire.Protocol.WebSocket.dll

Groups one or more WebSocket endpoints into a named service in the Bowire sidebar. Without this attribute endpoints land in a generic "WebSocket" service (or their own DisplayName when only one endpoint is registered).

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false)]
public sealed class WebSocketGroupAttribute : Attribute
Inheritance
WebSocketGroupAttribute
Inherited Members

Examples

// Inline (Minimal API) — one group per endpoint:
app.MapGet("/ws/send", sendHandler)
   .WithMetadata(new WebSocketEndpointAttribute("Send"))
   .WithMetadata(new WebSocketGroupAttribute("Chat"));

app.MapGet("/ws/receive", recvHandler)
   .WithMetadata(new WebSocketEndpointAttribute("Receive"))
   .WithMetadata(new WebSocketGroupAttribute("Chat"));

// Class-level — every endpoint defined inside inherits the group (read by
// WebSocketEndpointDiscovery via reflection on the delegate's declaring type):
[WebSocketGroup("Chat")]
public static class ChatEndpoints { ... }

Constructors

WebSocketGroupAttribute(string)

public WebSocketGroupAttribute(string name)

Parameters

name string

Properties

Name

Service/group name shown in the Bowire sidebar.

public string Name { get; }

Property Value

string