mirror of
https://github.com/AlexMacocian/Net.Sdk.Web.Extensions.git
synced 2026-07-15 13:39:29 +00:00
14 lines
451 B
C#
14 lines
451 B
C#
namespace AspNetCore.Extensions.Websockets;
|
|
|
|
public abstract class WebSocketConverterAttributeBase : Attribute
|
|
{
|
|
public abstract Type ConverterType { get; }
|
|
}
|
|
|
|
[AttributeUsage(AttributeTargets.Class)]
|
|
public sealed class WebSocketConverterAttribute<TConverter, TPayload> : WebSocketConverterAttributeBase
|
|
where TConverter : WebSocketMessageConverter<TPayload>, new()
|
|
{
|
|
public override sealed Type ConverterType => typeof(TConverter);
|
|
}
|