Пример #1
0
 /// <summary>
 /// Get chat message
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// Chat message UID
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ChatMessageModel> ApiChatByIdGetAsync(this IChatAPI operations, System.Guid id, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ApiChatByIdGetWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #2
0
 /// <summary>
 /// Post new chat message
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='chatMessage'>
 /// Chat message text
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ChatMessageModel> ApiChatPostAsync(this IChatAPI operations, ChatNewMessageModel chatMessage = default(ChatNewMessageModel), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ApiChatPostWithHttpMessagesAsync(chatMessage, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Пример #3
0
 /// <summary>
 /// Delete chat message
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// Chat message UID
 /// </param>
 public static void ApiChatByIdDelete(this IChatAPI operations, System.Guid id)
 {
     operations.ApiChatByIdDeleteAsync(id).GetAwaiter().GetResult();
 }
Пример #4
0
 /// <summary>
 /// Update chat message
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// Chat message UID
 /// </param>
 /// <param name='value'>
 /// Chat message text
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task ApiChatByIdPutAsync(this IChatAPI operations, System.Guid id, string value = default(string), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.ApiChatByIdPutWithHttpMessagesAsync(id, value, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Пример #5
0
 /// <summary>
 /// Update chat message
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// Chat message UID
 /// </param>
 /// <param name='value'>
 /// Chat message text
 /// </param>
 public static void ApiChatByIdPut(this IChatAPI operations, System.Guid id, string value = default(string))
 {
     operations.ApiChatByIdPutAsync(id, value).GetAwaiter().GetResult();
 }
Пример #6
0
 /// <summary>
 /// Get chat message
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// Chat message UID
 /// </param>
 public static ChatMessageModel ApiChatByIdGet(this IChatAPI operations, System.Guid id)
 {
     return(operations.ApiChatByIdGetAsync(id).GetAwaiter().GetResult());
 }
Пример #7
0
 /// <summary>
 /// Post new chat message
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='chatMessage'>
 /// Chat message text
 /// </param>
 public static ChatMessageModel ApiChatPost(this IChatAPI operations, ChatNewMessageModel chatMessage = default(ChatNewMessageModel))
 {
     return(operations.ApiChatPostAsync(chatMessage).GetAwaiter().GetResult());
 }
Пример #8
0
 /// <summary>
 /// Get all chat messages
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <ChatMessageModel> ApiChatGet(this IChatAPI operations)
 {
     return(operations.ApiChatGetAsync().GetAwaiter().GetResult());
 }