BasePathResolver

Vote:
 

im getting this obsolete warning:

'EPiServer.Web.Routing.RouteCollectionExtensions.ResolveBasePath(System.Web.Routing.RequestContext, System.Web.Routing.RouteValueDictionary)' is obsolete: 'Use BasePathResolver class instead'

where can I get the BasePathResolver instance or where can i get parameters to initialize constructor of this class?

#145381
Mar 02, 2016 18:07
Vote:
 

What are you trying to do?

Here is the link to the sdk

http://world.episerver.com/documentation/Class-library/?documentId=cms/9/33DCC733

#145388
Mar 02, 2016 20:24
Vote:
 
IUrlSegmentRouter segmentRouter;
            ServiceLocator.Current.TryGetExistingInstance(out segmentRouter);

            if (segmentRouter == null)
            {
                return;
            }

            segmentRouter.RootResolver = sd => sd.StartPage;
            var parameters = new MapContentRouteParameters
            {
                UrlSegmentRouter = segmentRouter,
                BasePathResolver = RouteCollectionExtensions.ResolveBasePath,
                Direction = SupportedDirection.Both
            };



and here im getting this error

#148859
May 25, 2016 13:00
Vote:
 

It referrs to EPiServer.Web.Routing.BasePathResolver

Depending on the context of your code you can get either as a constructor dependency (if your class instance is created from IOC container), else you can get it from ServiceLocator.Current.GetInstance<BasePathResolver>()

#148863
May 25, 2016 13:27
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.