C# Класс Saule.Serialization.DefaultUrlPathBuilder

Used to build url paths.
Наследование: IUrlPathBuilder
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BuildCanonicalPath ( ApiResource resource ) : string

Returns the UrlPath of the resource, ensuring it starts and ends with '/'

BuildCanonicalPath ( ApiResource resource, string id ) : string

Returns a path in the form `/resource.UrlPath/id/`.

BuildRelationshipPath ( ApiResource resource, string id, ResourceRelationship relationship ) : string

Returns a path in the form `/resource.UrlPath/id/relationships/relationship.UrlPath/`.

BuildRelationshipPath ( ApiResource resource, string id, ResourceRelationship relationship, string relatedResourceId ) : string

Returns a path in the form `/resource.UrlPath/id/relationship.UrlPath/`.

DefaultUrlPathBuilder ( ) : System

Initializes a new instance of the DefaultUrlPathBuilder class.

DefaultUrlPathBuilder ( string prefix ) : System

Initializes a new instance of the DefaultUrlPathBuilder class.

Приватные методы

Метод Описание
DefaultUrlPathBuilder ( string virtualPathRoot, string template ) : System

Описание методов

BuildCanonicalPath() публичный Метод

Returns the UrlPath of the resource, ensuring it starts and ends with '/'
public BuildCanonicalPath ( ApiResource resource ) : string
resource ApiResource The resource this path refers to.
Результат string

BuildCanonicalPath() публичный Метод

Returns a path in the form `/resource.UrlPath/id/`.
public BuildCanonicalPath ( ApiResource resource, string id ) : string
resource ApiResource The resource this path refers to.
id string The unique id of the resource.
Результат string

BuildRelationshipPath() публичный Метод

Returns a path in the form `/resource.UrlPath/id/relationships/relationship.UrlPath/`.
public BuildRelationshipPath ( ApiResource resource, string id, ResourceRelationship relationship ) : string
resource ApiResource The resource this path is related to.
id string The unique id of the resource.
relationship ResourceRelationship The relationship this path refers to.
Результат string

BuildRelationshipPath() публичный Метод

Returns a path in the form `/resource.UrlPath/id/relationship.UrlPath/`.
public BuildRelationshipPath ( ApiResource resource, string id, ResourceRelationship relationship, string relatedResourceId ) : string
resource ApiResource The resource this path is related to.
id string The unique id of the resource.
relationship ResourceRelationship The relationship this path refers to.
relatedResourceId string The id of the related resource.
Результат string

DefaultUrlPathBuilder() публичный Метод

Initializes a new instance of the DefaultUrlPathBuilder class.
public DefaultUrlPathBuilder ( ) : System
Результат System

DefaultUrlPathBuilder() публичный Метод

Initializes a new instance of the DefaultUrlPathBuilder class.
public DefaultUrlPathBuilder ( string prefix ) : System
prefix string A prefix for all urls generated by this instance of the DefaultUrlPathBuilder class.
Результат System