@@ -29,7 +29,7 @@ public static class ServicesExtensions
29
29
/// <param name="builder">The <see cref="WebApplicationBuilder" /> to configure the service collection.</param>
30
30
/// <param name="sectionName">The name of the configuration section containing service options.</param>
31
31
/// <returns>The configured <see cref="WebApplicationBuilder" />.</returns>
32
- private static async Task < WebApplicationBuilder > AddServicesWithOptions < TOptions , TService , TInterface > (
32
+ private static WebApplicationBuilder AddServicesWithOptions < TOptions , TService , TInterface > (
33
33
this WebApplicationBuilder builder , string sectionName )
34
34
where TOptions : class , new ( )
35
35
where TService : class , TInterface
@@ -57,9 +57,9 @@ private static async Task<WebApplicationBuilder> AddServicesWithOptions<TOptions
57
57
58
58
foreach ( var option in optionsArray )
59
59
{
60
- GlobalInstanceOptionsValidator validator = new ( ) ;
60
+ GlobalInstanceOptionsValidator validator = new GlobalInstanceOptionsValidator ( ) ;
61
61
62
- var results = await validator . ValidateAsync ( option as GlobalInstanceOptions ) ;
62
+ var results = validator . Validate ( option as GlobalInstanceOptions ) ;
63
63
64
64
if ( ! results . IsValid )
65
65
{
@@ -143,7 +143,7 @@ private static WebApplicationBuilder AddServiceWithOptions<TOptions, TService>(t
143
143
/// </summary>
144
144
/// <param name="builder">The <see cref="WebApplicationBuilder" /> to configure the service collection.</param>
145
145
/// <returns>The configured <see cref="WebApplicationBuilder" />.</returns>
146
- public static Task < WebApplicationBuilder > AddSonarrSupport ( this WebApplicationBuilder builder )
146
+ public static WebApplicationBuilder AddSonarrSupport ( this WebApplicationBuilder builder )
147
147
{
148
148
// builder.Serviceses.AddSingleton<IOptionsMonitoSonarrInstanceOptionsns>, OptionsMonitoSonarrInstanceOptionsns>>();
149
149
return builder . AddServicesWithOptions < SonarrInstanceOptions , SonarrClient , IArrApplication > ( "Sonarr" ) ;
@@ -154,7 +154,7 @@ public static Task<WebApplicationBuilder> AddSonarrSupport(this WebApplicationBu
154
154
/// </summary>
155
155
/// <param name="builder">The <see cref="WebApplicationBuilder" /> to configure the service collection.</param>
156
156
/// <returns>The configured <see cref="WebApplicationBuilder" />.</returns>
157
- public static Task < WebApplicationBuilder > AddLidarrSupport ( this WebApplicationBuilder builder )
157
+ public static WebApplicationBuilder AddLidarrSupport ( this WebApplicationBuilder builder )
158
158
{
159
159
return builder . AddServicesWithOptions < LidarrInstanceOptions , LidarrClient , IArrApplication > ( "Lidarr" ) ;
160
160
}
@@ -164,7 +164,7 @@ public static Task<WebApplicationBuilder> AddLidarrSupport(this WebApplicationBu
164
164
/// </summary>
165
165
/// <param name="builder">The <see cref="WebApplicationBuilder" /> to configure the service collection.</param>
166
166
/// <returns>The configured <see cref="WebApplicationBuilder" />.</returns>
167
- public static Task < WebApplicationBuilder > AddReadarrSupport ( this WebApplicationBuilder builder )
167
+ public static WebApplicationBuilder AddReadarrSupport ( this WebApplicationBuilder builder )
168
168
{
169
169
return builder . AddServicesWithOptions < ReadarrInstanceOptions , ReadarrClient , IArrApplication > ( "Readarr" ) ;
170
170
}
0 commit comments