UrlHelper Class

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

Contains helper methods for generating urls to various model objects.

public static class UrlHelper
Inheritance:
System.Object → UrlHelper

Fields

AvatarSize Default avatar size.

Methods

ApplicationUrl(bool) Returns the base url to the installation.
AvatarUrl(IHasAvatar, int?, int?, bool, Color?, bool, bool, bool) Returns an url to the avatar image for the specified object.
Breadcrumbs(IEntity, bool, bool) Returns the breadcrumb segments for en entity.
CommentsUrl(ICommentable, bool) Returns a url to the comments section for the specified entity.
ContentUrl(Entity, string, bool, bool) Returns the url to the content (binary data) of a Entity<File>.
ContentUrl(ExternalLink, bool, bool, bool) Returns a content url for the external link (only for links that reference files).
DavUrl(IEntity, bool) Returns an url that can be used by WebDAV clients.
DecodeUrlPart(string) Decodes url part.
EncodeUrlPart(string, bool) Encodes url part.
FileUrl(Attachment, string, bool, bool) Returns the url to the binary data of an attachment.
FileUrl(Blob, string, bool, bool) Returns the url to the binary data of a blob.
FileUrl(IFile, string, bool, bool) Returns the url to the binary data of a file.
GetAuthority(string) Returns the scheme and authority segments of the specified url, i.e. scheme + host + port.
GetEntityFromUrl(string) Returns the entity that lives at the specified url.
IconUrl(int?, bool, bool) Returns the url to the app icon (for the specified area).
IsExternalUrl(string) Check if an url is external
IsLocalUrl(string) Returns a value that indicates whether the URL is local relative to the application.
IsValidUrl(string, UriKind) Returns a value indicating if the url is valid, given the supplied kind.
ManifestUrl(bool, string) Returns the url to the app manifest (for the specified area).
MessengerUrl(Message, bool) Returns the url to the messenger
OfficeUrl(Attachment) Returns an url that can be used to open an Office document in Microsoft Word, Excel or Powerpoint using the Office URI Schemes.
OfficeUrl(IFile) Returns an url that can be used to open an Office document in Microsoft Word, Excel or Powerpoint using the Office URI Schemes.
PreviewUrl(Attachment, bool) Returns the url used to preview the specified attachment.
PreviewUrl(IFile, bool) Returns the url used to preview the specified file.
ThumbPlaceholderUrl(Blob, bool, bool) Returns a placeholder url to a thumbnail image of the specified blob. The url contains the string "{options}" which can be replaced with the desired resize options, e.g. "128", "128x0", "0x128", "128x256" etc.
ThumbPlaceholderUrl(Embed, bool, bool) Returns a placeholder url to a thumbnail image of the specified Embed. The url contains the string "{options}" which can be replaced with the desired resize options, e.g. "128", "128x0", "0x128", "128x256" etc.
ThumbPlaceholderUrl(IEntity, bool, bool) Returns a placeholder url to a thumbnail image of the specified entity. The url contains the string "{options}" which can be replaced with the desired resize options, e.g. "128", "128x0", "0x128", "128x256" etc.
ThumbUrl(Blob, int?, int?, bool, FitMode, ScaleMode, ContentAlignment, Color?, int, int, bool, bool, bool, bool) Returns an url to a thumbnail image for the specified blob.
ThumbUrl(Embed, int?, int?, bool, FitMode, ScaleMode, ContentAlignment, Color?, int, int, bool, bool, bool, bool) Returns an url to a thumbnail image for the specified embed
ThumbUrl(IEntity, int?, int?, bool, FitMode, ScaleMode, ContentAlignment, Color?, int, int, bool, bool, bool, bool) Returns an url to a thumbnail image for the specified entity.
ThumbUrl(IEnumerable, int?, int?, bool, FitMode, ScaleMode, ContentAlignment, Color?, int, int, bool, bool, bool, bool) Returns an url to a composite thumbnail image for the specified files.
ToPunycode(string) Converts an url from unicode to its [Punycode](https://en.wikipedia.org/wiki/Punycode) representation (the domain name will be Punycode encoded and the path will be URL encoded).
ToPunycode(Uri) Converts an uri from unicode to its [Punycode](https://en.wikipedia.org/wiki/Punycode) representation (the domain name will be Punycode encoded and the path will be URL encoded).
ToUnicode(string) Converts an url from [Punycode](https://en.wikipedia.org/wiki/Punycode) to its unicode representation (the domain name will be Punycode decoded and the path will be URL decoded).
ToUnicode(Uri) Converts an uri from [Punycode](https://en.wikipedia.org/wiki/Punycode) to its unicode representation (the domain name will be Punycode decoded and the path will be URL decoded).
Url(ExternalLink, bool, bool, bool) Returns an url for the external link.
Url(IEntity, bool) Returns the url to an entity.
Url(Space, bool) Returns the url to the first app of the specified type in a space.