C# 클래스 Hypermedia.Sample.Client.HypermediaSampleClient

상속: IDisposable
파일 보기 프로젝트 열기: cosullivan/Hypermedia 1 사용 예제들

공개 메소드들

메소드 설명
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