SiteUtils
Assembly: ServiceStack.Common.dll
View Source
public static class SiteUtils
Methods
UrlFromSlug(String)
Allow slugs to capture URLs, Examples: techstacks.io => https://techstacks.io http:techstacks.io => http://techstacks.io techstacks.io:1000 => https://techstacks.io:1000 techstacks.io:1000:site1:site2 => https://techstacks.io:1000/site1/site2 techstacks.io:site1%7Csite2 => https://techstacks.io/site1|site2 techstacks.io:1000:site1:site2(a:1,b:"c,d",e:f) => https://techstacks.io:1000/site1/site2(a:1,b:"c,d",e:f)
View Source
public static string UrlFromSlug(string slug)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | slug |
UrlToSlug(String)
Convert URL to URL-friendly slugs, Examples: https://techstacks.io => techstacks.io http://techstacks.io => http:techstacks.io https://techstacks.io:1000 => techstacks.io:1000 https://techstacks.io:1000/site1/site2 => techstacks.io:1000:site1:site2 https://techstacks.io/site1|site2 => techstacks.io:site|site2 https://techstacks.io:1000/site1/site2(a:1,b:"c,d",e:f) => techstacks.io:1000:site1:site2(a:1,b:"c,d",e:f)
View Source
public static string UrlToSlug(string url)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | url |
ToUrlEncoded(List<String>)
View Source
public static string ToUrlEncoded(List<string> args)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Collections.Generic.List<System.String> | args |