/// <summary>
 /// Publish the runbook identified by runbookId.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXXXX.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IRunbookOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the publish runbook operation.
 /// </param>
 /// <returns>
 /// The response model for the publish runbook operation.
 /// </returns>
 public static Task<RunbookPublishResponse> PublishAsync(this IRunbookOperations operations, string automationAccount, RunbookPublishParameters parameters)
 {
     return operations.PublishAsync(automationAccount, parameters, CancellationToken.None);
 }
 /// <summary>
 /// Publish the runbook identified by runbookId.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/XXXXXXX.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IRunbookOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the publish runbook operation.
 /// </param>
 /// <returns>
 /// The response model for the publish runbook operation.
 /// </returns>
 public static RunbookPublishResponse Publish(this IRunbookOperations operations, string automationAccount, RunbookPublishParameters parameters)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IRunbookOperations)s).PublishAsync(automationAccount, parameters);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }