File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
tests/KubeOps.TestOperator Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,17 @@ namespace KubeOps.Operator
9
9
{
10
10
public static class ServiceCollectionExtensions
11
11
{
12
+ public static IServiceCollection AddResourceController < TController > ( this IServiceCollection services )
13
+ where TController : class , IResourceController =>
14
+ services . AddHostedService < TController > ( ) ;
15
+
12
16
public static IServiceCollection AddResourceController < TController , TEntity > ( this IServiceCollection services )
13
- where TController : ResourceControllerBase < TEntity >
17
+ where TController : class , IResourceController < TEntity >
14
18
where TEntity : IKubernetesObject < V1ObjectMeta > =>
15
19
services . AddHostedService < TController > ( ) ;
16
20
17
21
public static IServiceCollection AddResourceFinalizer < TFinalizer , TEntity > ( this IServiceCollection services )
18
- where TFinalizer : ResourceFinalizerBase < TEntity >
22
+ where TFinalizer : class , IResourceFinalizer < TEntity >
19
23
where TEntity : IKubernetesObject < V1ObjectMeta > =>
20
24
services . AddTransient < IResourceFinalizer < TEntity > , TFinalizer > ( ) ;
21
25
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public Operator()
15
15
services =>
16
16
{
17
17
services . AddTransient < IManager , TestManager . TestManager > ( ) ;
18
- services . AddResourceController < TestController , TestEntity > ( ) ;
18
+ services . AddResourceController < TestController > ( ) ;
19
19
services . AddResourceFinalizer < TestEntityFinalizer , TestEntity > ( ) ;
20
20
} ) ;
21
21
}
You can’t perform that action at this time.
0 commit comments