diff --git a/src/WhatsApp/AnonymousDelegatingHandler.cs b/src/WhatsApp/AnonymousWhatsAppHandler.cs similarity index 79% rename from src/WhatsApp/AnonymousDelegatingHandler.cs rename to src/WhatsApp/AnonymousWhatsAppHandler.cs index 35a0305..5624c60 100644 --- a/src/WhatsApp/AnonymousDelegatingHandler.cs +++ b/src/WhatsApp/AnonymousWhatsAppHandler.cs @@ -1,8 +1,10 @@  namespace Devlooped.WhatsApp; -/// Represents a delegating chat client that wraps an inner handler with implementation provided by a delegate. -class AnonymousDelegatingHandler : DelegatingHandler +/// +/// Represents a delegating handler that wraps an inner handler with implementation provided by a delegate. +/// +class AnonymousWhatsAppHandler : DelegatingWhatsAppHandler { /// The delegate to use as the implementation of . readonly Func, IWhatsAppHandler, CancellationToken, Task> handlerFunc; @@ -12,7 +14,7 @@ class AnonymousDelegatingHandler : DelegatingHandler /// /// The inner handler. /// A delegate that provides the implementation for - public AnonymousDelegatingHandler( + public AnonymousWhatsAppHandler( IWhatsAppHandler innerHandler, Func, IWhatsAppHandler, CancellationToken, Task> handlerFunc) : base(innerHandler) => this.handlerFunc = Throw.IfNull(handlerFunc); diff --git a/src/WhatsApp/DelegatingHandler.cs b/src/WhatsApp/DelegatingWhatsAppHandler.cs similarity index 86% rename from src/WhatsApp/DelegatingHandler.cs rename to src/WhatsApp/DelegatingWhatsAppHandler.cs index efdbdef..bed92af 100644 --- a/src/WhatsApp/DelegatingHandler.cs +++ b/src/WhatsApp/DelegatingWhatsAppHandler.cs @@ -7,13 +7,13 @@ /// This is recommended as a base type when building handlers that can be chained around an underlying . /// The default implementation simply passes each call to the inner handler instance. /// -public class DelegatingHandler : IWhatsAppHandler, IDisposable +public class DelegatingWhatsAppHandler : IWhatsAppHandler, IDisposable { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The wrapped handler instance. - public DelegatingHandler(IWhatsAppHandler innerHandler) + public DelegatingWhatsAppHandler(IWhatsAppHandler innerHandler) => InnerHandler = Throw.IfNull(innerHandler); /// Gets the inner . diff --git a/src/WhatsApp/LoggingHandler.cs b/src/WhatsApp/LoggingHandler.cs index ae3823c..9a5db17 100644 --- a/src/WhatsApp/LoggingHandler.cs +++ b/src/WhatsApp/LoggingHandler.cs @@ -3,7 +3,7 @@ namespace Devlooped.WhatsApp; -public partial class LoggingHandler(IWhatsAppHandler innerHandler, ILogger logger) : DelegatingHandler(innerHandler) +public partial class LoggingHandler(IWhatsAppHandler innerHandler, ILogger logger) : DelegatingWhatsAppHandler(innerHandler) { JsonSerializerOptions options = JsonContext.DefaultOptions; diff --git a/src/WhatsApp/WhatsAppHandlerBuilder.cs b/src/WhatsApp/WhatsAppHandlerBuilder.cs index 63cc35b..63a297f 100644 --- a/src/WhatsApp/WhatsAppHandlerBuilder.cs +++ b/src/WhatsApp/WhatsAppHandlerBuilder.cs @@ -66,7 +66,7 @@ public WhatsAppHandlerBuilder Use(Func, IWhatsAppHandler, C { _ = Throw.IfNull(handlerFunc); - return Use((innerClient, _) => new AnonymousDelegatingHandler(innerClient, handlerFunc)); + return Use((innerClient, _) => new AnonymousWhatsAppHandler(innerClient, handlerFunc)); } class EmptyHandler : IWhatsAppHandler