Show / Hide Table of Contents

Class UriExtensions

Extension methods for URLs

Inheritance
Object
UriExtensions
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace:FubarDev.WebDavServer
Assembly:FubarDev.WebDavServer.dll
Syntax
public static class UriExtensions

Methods

| Improve this Doc View Source

Append(Uri, ICollection)

Appends the name of a collection to the baseUri

Declaration
public static Uri Append(this Uri baseUri, ICollection entry)
Parameters
Type Name Description
Uri baseUri

The base URL to append the entry name to

ICollection entry

The ICollection whose name to append to the baseUri

Returns
Type Description
Uri

The baseUri with the entry name appended.

| Improve this Doc View Source

Append(Uri, IDocument)

Appends the name of a document to the baseUri

Declaration
public static Uri Append(this Uri baseUri, IDocument entry)
Parameters
Type Name Description
Uri baseUri

The base URL to append the entry name to

IDocument entry

The IDocument whose name to append to the baseUri

Returns
Type Description
Uri

The baseUri with the entry name appended.

| Improve this Doc View Source

Append(Uri, IEntry)

Append the name of an entry to the baseUri

Declaration
public static Uri Append(this Uri baseUri, IEntry entry)
Parameters
Type Name Description
Uri baseUri

The base URL to append the entry name to

IEntry entry

The IEntry whose name to append to the baseUri

Returns
Type Description
Uri

The baseUri with the entry name appended.

| Improve this Doc View Source

Append(Uri, String, Boolean)

Append a relative URL to the baseUri

Declaration
public static Uri Append(this Uri baseUri, string relative, bool isEscaped)
Parameters
Type Name Description
Uri baseUri

The base URL to append the relative URI to

String relative

The relative URL to append to the baseUri

Boolean isEscaped

Is the relative URL already escaped?

Returns
Type Description
Uri

The baseUri with the appended relative URL.

Remarks

When the relative URL isn't escaped, then it MUST NOT contain a path separator.

| Improve this Doc View Source

Append(Uri, Uri)

Append a relative URI to the baseUri

Declaration
public static Uri Append(this Uri baseUri, Uri relativeUri)
Parameters
Type Name Description
Uri baseUri

The base URL to append the relativeUri to

Uri relativeUri

The relative URL to append to the baseUri

Returns
Type Description
Uri

The baseUri with the appended relativeUri.

| Improve this Doc View Source

AppendDirectory(Uri, String)

Appends a collection name to the baseUri

Declaration
public static Uri AppendDirectory(this Uri baseUri, string collectionName)
Parameters
Type Name Description
Uri baseUri

The base URL to append the name to

String collectionName

The collection name to append

Returns
Type Description
Uri

The baseUri with the appended name.

| Improve this Doc View Source

GetCollectionUri(Uri)

Gets the collection URL.

Declaration
public static Uri GetCollectionUri(this Uri url)
Parameters
Type Name Description
Uri url

The URL to get the collection for

Returns
Type Description
Uri

The collection URL

Remarks

This is different from GetParent(Uri), because this function returns the same URL if the url is already an URL to a collection.

| Improve this Doc View Source

GetName(Uri)

Gets the name of the collection or document URL

Declaration
public static string GetName(this Uri url)
Parameters
Type Name Description
Uri url

The collection or document URL

Returns
Type Description
String

The name of the collection or document URL

| Improve this Doc View Source

GetParent(Uri)

Gets the URL of the containing collection of a collection or document URL

Declaration
public static Uri GetParent(this Uri url)
Parameters
Type Name Description
Uri url

The URL to get the parent URL for

Returns
Type Description
Uri

The URL of the containing collection

| Improve this Doc View Source

UriEscape(String)

Escapes the string in a WebDAV compatible way

Declaration
public static string UriEscape(this string s)
Parameters
Type Name Description
String s

The string to escape

Returns
Type Description
String

The escaped string

  • Improve this Doc
  • View Source
Back to top Copyright © 2016-2017 Fubar Development Junker
Generated by DocFX