Show / Hide Table of Contents

    Class RelationExtension

    Helpers for handling links.

    Inheritance
    System.Object
    RelationExtension
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: DocuWare.Services.Http.Client
    Assembly: DocuWare.RestClient.dll
    Syntax
    public static class RelationExtension

    Methods

    GetLink(IRelations, String)

    Gets the link by its name.

    Declaration
    public static Link GetLink(this IRelations linkable, string relationName)
    Parameters
    Type Name Description
    IRelations linkable

    The linkable.

    System.String relationName

    Name of the relation.

    Returns
    Type Description
    Link

    The link, if it exists; null otherwise.

    GetLink(IEnumerable<Link>, String)

    Gets the link by its name.

    Declaration
    public static Link GetLink(this IEnumerable<Link> links, string relationName)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<Link> links

    The links.

    System.String relationName

    Name of the relation.

    Returns
    Type Description
    Link

    The link, if it exists; null otherwise.

    GetRelationUri(IRelations, String)

    Gets the URI of the relation specified by the name.

    Declaration
    public static string GetRelationUri(this IRelations relations, string relationName)
    Parameters
    Type Name Description
    IRelations relations

    The relations.

    System.String relationName

    Name of the relation.

    Returns
    Type Description
    System.String

    The link, if it exists; null otherwise.

    GetRelationUriOrThrow(IRelations, String)

    Gets the URI of the relation specified by the name.

    Declaration
    public static string GetRelationUriOrThrow(this IRelations relations, string relationName)
    Parameters
    Type Name Description
    IRelations relations

    The relations.

    System.String relationName

    Name of the relation.

    Returns
    Type Description
    System.String
    Exceptions
    Type Condition
    System.ArgumentException

    The specified link is not found.

    HasRelationUri(IRelations, String)

    Determines whether the specified link exists.

    Declaration
    public static bool HasRelationUri(this IRelations relations, string relationName)
    Parameters
    Type Name Description
    IRelations relations

    The relations.

    System.String relationName

    Name of the relation.

    Returns
    Type Description
    System.Boolean

    true if the specified link exists; otherwise, false.

    About Us Contact Imprint Terms Data privacy
    © 2024 DocuWare Corporation powered by DocFX Back to top