/// <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(); }
/// <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; }