1
1
using System . Diagnostics . CodeAnalysis ;
2
2
3
3
using GenHTTP . Api . Infrastructure ;
4
+
4
5
using GenHTTP . Modules . Conversion . Formatters ;
5
6
using GenHTTP . Modules . Conversion . Providers ;
6
7
using GenHTTP . Modules . Layouting . Provider ;
@@ -23,7 +24,8 @@ public static class Extensions
23
24
/// <typeparam name="T">The type of the resource to be added</typeparam>
24
25
/// <param name="path">The path the resource should be available at</param>
25
26
/// <param name="injectors">Optionally the injectors to be used by this service</param>
26
- /// <param name="formats">Optionally the formats to be used by this service</param>
27
+ /// <param name="serializers">Optionally the formats to be used by this service</param>
28
+ /// <param name="formatters">Optionally the formatters to be used by this service</param>
27
29
public static LayoutBuilder AddService < [ DynamicallyAccessedMembers ( DynamicallyAccessedMemberTypes . All ) ] T > ( this LayoutBuilder layout , string path , IBuilder < InjectionRegistry > ? injectors = null , IBuilder < SerializationRegistry > ? serializers = null , IBuilder < FormatterRegistry > ? formatters = null ) where T : new ( )
28
30
{
29
31
return layout . Add ( path , ServiceResource . From < T > ( ) . Configured ( injectors , serializers , formatters ) ) ;
@@ -36,7 +38,8 @@ public static class Extensions
36
38
/// <param name="path">The path the resource should be available at</param>
37
39
/// <param name="instance">The webservice resource instance</param>
38
40
/// <param name="injectors">Optionally the injectors to be used by this service</param>
39
- /// <param name="formats">Optionally the formats to be used by this service</param>
41
+ /// <param name="serializers">Optionally the formats to be used by this service</param>
42
+ /// <param name="formatters">Optionally the formatters to be used by this service</param>
40
43
public static LayoutBuilder AddService ( this LayoutBuilder layout , string path , object instance , IBuilder < InjectionRegistry > ? injectors = null , IBuilder < SerializationRegistry > ? serializers = null , IBuilder < FormatterRegistry > ? formatters = null )
41
44
{
42
45
return layout . Add ( path , ServiceResource . From ( instance ) . Configured ( injectors , serializers , formatters ) ) ;
0 commit comments