/// <summary>
 /// Create or update an ActivityType.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.IActivityTypeOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the data factory.
 /// </param>
 /// <param name='dataFactoryName'>
 /// Required. The name of the data factory.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to create or update an
 /// ActivityType definition.
 /// </param>
 /// <returns>
 /// The create or update ActivityType operation response.
 /// </returns>
 public static Task<ActivityTypeCreateOrUpdateResponse> CreateOrUpdateAsync(
     this IActivityTypeOperations operations,
     string resourceGroupName,
     string dataFactoryName,
     ActivityTypeCreateOrUpdateParameters parameters)
 {
     return operations.CreateOrUpdateAsync(
         resourceGroupName,
         dataFactoryName,
         parameters,
         CancellationToken.None);
 }
 /// <summary>
 /// Create or update an ActivityType.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.DataFactories.IActivityTypeOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The resource group name of the data factory.
 /// </param>
 /// <param name='dataFactoryName'>
 /// Required. The name of the data factory.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters required to create or update an
 /// ActivityType definition.
 /// </param>
 /// <returns>
 /// The create or update ActivityType operation response.
 /// </returns>
 public static ActivityTypeCreateOrUpdateResponse CreateOrUpdate(
     this IActivityTypeOperations operations,
     string resourceGroupName,
     string dataFactoryName,
     ActivityTypeCreateOrUpdateParameters parameters)
 {
     return Task.Factory.StartNew(
         s =>
             ((IActivityTypeOperations)s).CreateOrUpdateAsync(resourceGroupName, dataFactoryName, parameters),
             operations,
             CancellationToken.None,
             TaskCreationOptions.None,
             TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }