C# Класс Hypermedia.Sample.Client.HypermediaSampleClient

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetCommentsByPostIdAsync ( int postId, CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Return the comments for the given post ID.

GetPostByIdAsync ( int id, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Return the post with the given resource ID.

GetPostsAsync ( int skip, int take = 10, CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Returns a list of posts.

GetUserByIdAsync ( int id, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Return the user with the given resource ID.

GetUsersAsync ( int skip, int take = 10, CancellationToken cancellationToken = default(CancellationToken) ) : Task>

Returns a list of users.

HypermediaSampleClient ( string endpoint, string accessToken ) : System

Constructor.

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

Метод Описание
CreateResolver ( ) : IContractResolver

Returns the resource contract resolver for the known types.

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

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

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Результат void

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

Return the comments for the given post ID.
public GetCommentsByPostIdAsync ( int postId, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
postId int The ID of the post to return the comments for.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task>

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

Return the post with the given resource ID.
public GetPostByIdAsync ( int id, CancellationToken cancellationToken = default(CancellationToken) ) : Task
id int The ID of the post to return.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

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

Returns a list of posts.
public GetPostsAsync ( int skip, int take = 10, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
skip int The number of posts to skip from the start.
take int The number of posts to return.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task>

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

Return the user with the given resource ID.
public GetUserByIdAsync ( int id, CancellationToken cancellationToken = default(CancellationToken) ) : Task
id int The ID of the user to return.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task

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

Returns a list of users.
public GetUsersAsync ( int skip, int take = 10, CancellationToken cancellationToken = default(CancellationToken) ) : Task>
skip int The number of users to skip from the start.
take int The number of users to return.
cancellationToken System.Threading.CancellationToken The cancellation token.
Результат Task>

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

Constructor.
public HypermediaSampleClient ( string endpoint, string accessToken ) : System
endpoint string The endpoint to connect the client to.
accessToken string The access token.
Результат System