0

I have a custom implementation of the IPartialRouter with the method GetPartialVirtualPath. So it looks like

public class MyCustomPartialRouter : IPartialRouter<PageType, ModelType>
{
    public PartialRouteData GetPartialVirtualPath(ModelType article, string language, RouteValueDictionary routeValues, RequestContext requestContext)
    {
        //Some code here...
    }

    public object RoutePartial(PageType content, SegmentContext segmentContext)
    {
        //... and here
    }
}

In another place I make a call of UrlResolver.GetVirtualPathForNonContent method inside the extentsion-method:

public static string GetUrl(this UrlResolver urlResolver, object partialRoutedObject)
    {
        var language = ContentLanguage.PreferredCulture.Name;
        var virtualPath = urlResolver.GetVirtualPathForNonContent(partialRoutedObject, language, new VirtualPathArguments());

        return virtualPath.GetUrl();
    }

After that method GetPartialVirtualPath is called 7 times... in another project with the same logic I have the same behavior.

Have you any idea why that might be?

viktor.kudria
  • 229
  • 2
  • 14

0 Answers0