示例#1
0
 /// <param name='operations'>
 /// Reference to the Rg.ClientApp.ITimeline.
 /// </param>
 /// <param name='createMessage'>
 /// Required.
 /// </param>
 public static object PostByCreatemessage(this ITimeline operations, CreateTimelineEntry createMessage)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((ITimeline)s).PostByCreatemessageAsync(createMessage);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
示例#2
0
 /// <param name='operations'>
 /// Reference to the Rg.ClientApp.ITimeline.
 /// </param>
 /// <param name='createMessage'>
 /// Required.
 /// </param>
 /// <param name='cancellationToken'>
 /// Cancellation token.
 /// </param>
 public static async Task<object> PostByCreatemessageAsync(this ITimeline operations, CreateTimelineEntry createMessage, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     Microsoft.Rest.HttpOperationResponse<object> result = await operations.PostByCreatemessageWithOperationResponseAsync(createMessage, cancellationToken).ConfigureAwait(false);
     return result.Body;
 }