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;   | 
      
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;   | 
      
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;   | 
      
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 | 
  |