diff --git a/src/Stars.Console/Terradue.Stars.Console.csproj b/src/Stars.Console/Terradue.Stars.Console.csproj index 5b637cc9..d8621442 100644 --- a/src/Stars.Console/Terradue.Stars.Console.csproj +++ b/src/Stars.Console/Terradue.Stars.Console.csproj @@ -2,7 +2,7 @@ Exe net6.0 - 2.24.4 + 2.24.5 Stars is a CLI for working with Spatio Temporal Catalog such as STAC but not only $(Version)-$(VersionSuffix) diff --git a/src/Stars.Data/Terradue.Stars.Data.csproj b/src/Stars.Data/Terradue.Stars.Data.csproj index f316dab2..5a409e1d 100644 --- a/src/Stars.Data/Terradue.Stars.Data.csproj +++ b/src/Stars.Data/Terradue.Stars.Data.csproj @@ -4,7 +4,7 @@ Terradue.Stars.Data Terradue.Stars.Data Collection of data Plugins for Terradue.Stars - 2.24.4 + 2.24.5 $(Version)-$(VersionSuffix) NU1603 diff --git a/src/Stars.Services/Router/RouterService.cs b/src/Stars.Services/Router/RouterService.cs index 10370678..184bb4b2 100644 --- a/src/Stars.Services/Router/RouterService.cs +++ b/src/Stars.Services/Router/RouterService.cs @@ -62,12 +62,6 @@ public async Task RouteAsync(IResource route, int recursivity, IRouter p // Execute the function for the item and return; return await onItemFunction.Invoke(itemNode, prevRouter, state, ct); } - // If route is a Collection - if (route is ICollection collectionNode) - { - // Execute the function for the collection and return; - return await onCollectionFunction.Invoke(collectionNode, prevRouter, state, ct); - } // Ask the router manager if there is another router available for this route router = await routersManager.GetRouterAsync(route); // Definitively impossible to Route @@ -88,8 +82,8 @@ public async Task RouteAsync(IResource route, int recursivity, IRouter p // If route is a Collection if (newRoute is ICollection) { - // Execute the function for the collection and return; - return await onCollectionFunction.Invoke(newRoute as ICollection, prevRouter, state, ct); + // Execute the function for the collection + await onCollectionFunction.Invoke(newRoute as ICollection, prevRouter, state, ct); } catalogNode = newRoute as ICatalog; @@ -103,6 +97,12 @@ public async Task RouteAsync(IResource route, int recursivity, IRouter p } else { + // If route is a Collection + if (catalogNode is ICollection) + { + // Execute the function for the collection + await onCollectionFunction.Invoke(catalogNode as ICollection, router, state, ct); + } // If the resource is a catalog, we keep the previous router router = prevRouter; } diff --git a/src/Stars.Services/Terradue.Stars.Services.csproj b/src/Stars.Services/Terradue.Stars.Services.csproj index 8934138a..754fea45 100644 --- a/src/Stars.Services/Terradue.Stars.Services.csproj +++ b/src/Stars.Services/Terradue.Stars.Services.csproj @@ -3,7 +3,7 @@ netstandard2.0 Terradue.Stars Stars is a set of services for working with Spatio Temporal Catalog such as STAC but not only - 2.24.4 + 2.24.5 $(Version)-$(VersionSuffix) Terradue.Stars.Services