Class Role
- Namespace
- DocuWare.Platform.ServerClient
- Assembly
- DocuWare.Platform.ServerClient.dll
Defines a DocuWare role
public class Role : IRelationsWithProxy, IRelations, IHttpClientProxy
- Inheritance
-
Role
- Implements
- Inherited Members
Constructors
Role()
Creates a new instance of this class
public Role()
Properties
Active
Is role active flag.
public bool Active { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Id
The role id.
public string Id { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Links
public Link[] Links { get; set; }
Property Value
| Type | Description |
|---|---|
| Link[] |
Name
The name of the user.
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
SelfRelationLink
Gets the Uri of the link for the relation “self”.
public string SelfRelationLink { get; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
Returns the uri of the link for the relation “self” if it exists, or
Type
Type of role.
public RoleTypes Type { get; set; }
Property Value
| Type | Description |
|---|---|
| RoleTypes |
Methods
GetRoleFromSelfRelation()
Calls the HTTP Get method on the link for the relation “self”.
public Role GetRoleFromSelfRelation()
Returns
| Type | Description |
|---|---|
| Role | The content of the response. |
GetRoleFromSelfRelationAsync()
Calls the HTTP Get method on the link for the relation “self” asynchronously.
public Task<DeserializedHttpResponse<Role>> GetRoleFromSelfRelationAsync()
Returns
| Type | Description |
|---|---|
| Task<DeserializedHttpResponse<Role>> | A task which runs the request. |
Remarks
This method follows the link for the relation “self”.
GetRoleFromSelfRelationAsync(CancellationToken)
Calls the HTTP Get method on the link for the relation “self” asynchronously.
public Task<DeserializedHttpResponse<Role>> GetRoleFromSelfRelationAsync(CancellationToken cancellationToken)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The cancellation token to cancel the request. |
Returns
| Type | Description |
|---|---|
| Task<DeserializedHttpResponse<Role>> | A task which runs the request. |
Remarks
This method follows the link for the relation “self”.
SetProxy(HttpClientProxy)
Sets the HTTP communication proxy which is used in further HTTP communication.
public void SetProxy(HttpClientProxy proxy)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpClientProxy | proxy | The HttpClient instance which is used in further HTTP communication. |
Remarks
The HTTP proxy is used to handle the HTTP requests which are created by this instance. The proxy is used in case a request is sent to a URL which is resolved from a link.