@@ -11,10 +11,10 @@ public static class LocationExtensions
11
11
/// <param name="state"></param>
12
12
/// <param name="config"></param>
13
13
/// <returns></returns>
14
- public static string GetLocation ( this IState state , IEntityConfig config )
14
+ public static string GetLocation ( this IState state , IResourceConfig config )
15
15
=> state . GetDependencyLocationDispatch ( config ) ? . Location ;
16
16
17
- static DependencyLocation GetDependencyLocationDispatch ( this IState state , IEntityConfig config )
17
+ static DependencyLocation GetDependencyLocationDispatch ( this IState state , IResourceConfig config )
18
18
=> config . Accept ( new GetDependencyLocationVisitor ( ) , state ) ;
19
19
20
20
static DependencyLocation GetDependencyLocation < TModel > (
@@ -27,28 +27,16 @@ static DependencyLocation GetDependencyLocation<TModel>(
27
27
config . Strategy . GetLocation ( info ) ,
28
28
typeof ( TModel ) != typeof ( ResourceGroup ) )
29
29
: config
30
- . Dependencies
30
+ . GetResourceDependencies ( )
31
31
. Select ( state . GetDependencyLocationDispatch )
32
32
. Aggregate ( null as DependencyLocation , Merge ) ;
33
33
}
34
34
35
- static DependencyLocation GetDependencyLocation < TModel , TParentModel > (
36
- this IState state , NestedResourceConfig < TModel , TParentModel > config )
37
- where TModel : class
38
- where TParentModel : class
39
- => config . Parent . Accept ( new GetDependencyLocationVisitor ( ) , state ) ;
40
-
41
- sealed class GetDependencyLocationVisitor : IEntityConfigVisitor < IState , DependencyLocation >
35
+ sealed class GetDependencyLocationVisitor : IResourceConfigVisitor < IState , DependencyLocation >
42
36
{
43
37
public DependencyLocation Visit < TModel > ( ResourceConfig < TModel > config , IState state )
44
38
where TModel : class
45
39
=> state . GetDependencyLocation ( config ) ;
46
-
47
- public DependencyLocation Visit < TModel , TParentModel > (
48
- NestedResourceConfig < TModel , TParentModel > config , IState state )
49
- where TModel : class
50
- where TParentModel : class
51
- => state . GetDependencyLocation ( config ) ;
52
40
}
53
41
54
42
sealed class DependencyLocation
0 commit comments