/// <exclude /> public PageUrl(PublicationScope publicationScope, CultureInfo locale, Guid pageId, PageUrlType urlType) { Verify.ArgumentNotNull(locale, "locale"); Verify.ArgumentCondition(pageId != Guid.Empty, "pageId", "PageId should not be an empty guid."); this.PublicationScope = publicationScope; Locale = locale; PageId = pageId; UrlType = urlType; }
/// <exclude /> public PageUrl(PublicationScope publicationScope, CultureInfo locale, Guid pageId, PageUrlType urlType) { Verify.ArgumentNotNull(locale, "locale"); Verify.ArgumentCondition(pageId != Guid.Empty, "pageId", "PageId should not be an empty guid."); this.PublicationScope = publicationScope; Locale = locale; PageId = pageId; UrlType = urlType; }
private static UrlKind ToUrlKind(PageUrlType pageUrlType) { switch (pageUrlType) { case PageUrlType.Public: return(UrlKind.Public); case PageUrlType.Internal: return(UrlKind.Internal); case PageUrlType.Friendly: return(UrlKind.Friendly); } return(UrlKind.Undefined); }
/// <summary> /// Builds a url of the the specified URL type. /// </summary> /// <param name="urlType">Type of the URL.</param> /// <returns></returns> public UrlBuilder Build(PageUrlType urlType) { IPage page = GetPage(); if (page == null) { return(null); } PageUrlData pageUrlData = new PageUrlData(page); string url = PageUrls.BuildUrl(pageUrlData, ToUrlKind(urlType), new UrlSpace()); return(url != null ? new UrlBuilder(url) : null); }
private static UrlKind ToUrlKind(PageUrlType pageUrlType) { switch (pageUrlType) { case PageUrlType.Public: return UrlKind.Public; case PageUrlType.Internal: return UrlKind.Internal; case PageUrlType.Friendly: return UrlKind.Friendly; } return UrlKind.Undefined; }
/// <summary> /// Builds a url of the the specified URL type. /// </summary> /// <param name="urlType">Type of the URL.</param> /// <returns></returns> public UrlBuilder Build(PageUrlType urlType) { IPage page = GetPage(); if(page == null) { return null; } PageUrlData pageUrlData = new PageUrlData(page); string url = PageUrls.BuildUrl(pageUrlData, ToUrlKind(urlType), new UrlSpace()); return url != null ? new UrlBuilder(url) : null; }