diff --git a/src/WhatsApp/WhatsAppHandlerExtensions.cs b/src/WhatsApp/WhatsAppHandlerExtensions.cs index 9a26bd7..736893c 100644 --- a/src/WhatsApp/WhatsAppHandlerExtensions.cs +++ b/src/WhatsApp/WhatsAppHandlerExtensions.cs @@ -1,5 +1,21 @@ namespace Devlooped.WhatsApp; -class WhatsAppHandlerExtensions +/// +/// Provides the extension method to build a pipeline +/// around a given handler. +/// +public static class WhatsAppHandlerExtensions { + /// + /// Creates a new using as its inner handler. + /// + /// + /// This method is equivalent to using the constructor directly. + /// + /// is . + public static WhatsAppHandlerBuilder AsBuilder(this IWhatsAppHandler handler) + { + Throw.IfNull(handler); + return new(_ => handler); + } }