public static IWebSocketHostBuilder UseCommand <TKey, TPackageInfo>(this IWebSocketHostBuilder builder, Action <CommandOptions> configurator) where TPackageInfo : class, IKeyedPackageInfo <TKey> { return(builder.UseCommand <TKey, TPackageInfo>() .ConfigureServices((ctx, services) => { services.Configure(configurator); }) as IWebSocketHostBuilder); }
public static IWebSocketHostBuilder UseCommand <TKey, TPackageInfo, TPackageMapper>(this IWebSocketHostBuilder builder, Action <CommandOptions> configurator) where TPackageInfo : class, IKeyedPackageInfo <TKey> where TPackageMapper : class, IPackageMapper <WebSocketPackage, TPackageInfo>, new() { return(builder.UseCommand <TKey, TPackageInfo, TPackageMapper>() .ConfigureServices((hostCtx, services) => { services.Configure(configurator); }) as IWebSocketHostBuilder); }