C# Class Saule.Serialization.DefaultUrlPathBuilder

Used to build url paths.
Inheritance: IUrlPathBuilder
Afficher le fichier Open project: joukevandermaas/saule Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
DefaultUrlPathBuilder ( string virtualPathRoot, string template ) : System

Method Details

BuildCanonicalPath() public méthode

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.
Résultat string

BuildCanonicalPath() public méthode

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.
Résultat string

BuildRelationshipPath() public méthode

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.
Résultat string

BuildRelationshipPath() public méthode

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.
Résultat string

DefaultUrlPathBuilder() public méthode

Initializes a new instance of the DefaultUrlPathBuilder class.
public DefaultUrlPathBuilder ( ) : System
Résultat System

DefaultUrlPathBuilder() public méthode

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.
Résultat System