示例#1
0
 /// <summary>
 /// Update project
 /// </summary>
 /// <remarks>
 /// The project resource is a nested resource representing a stored migration
 /// project. The PATCH method updates an existing project.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='parameters'>
 /// Information about the project
 /// </param>
 /// <param name='groupName'>
 /// Name of the resource group
 /// </param>
 /// <param name='serviceName'>
 /// Name of the service
 /// </param>
 /// <param name='projectName'>
 /// Name of the project
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Project> UpdateAsync(this IProjectsOperations operations, Project parameters, string groupName, string serviceName, string projectName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(parameters, groupName, serviceName, projectName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <summary>
 /// Get projects in a service
 /// </summary>
 /// <remarks>
 /// The project resource is a nested resource representing a stored migration
 /// project. This method returns a list of projects owned by a service
 /// resource.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupName'>
 /// Name of the resource group
 /// </param>
 /// <param name='serviceName'>
 /// Name of the service
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Project> > ListAsync(this IProjectsOperations operations, string groupName, string serviceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(groupName, serviceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#3
0
 /// <summary>
 /// Get projects in a service
 /// </summary>
 /// <remarks>
 /// The project resource is a nested resource representing a stored migration
 /// project. This method returns a list of projects owned by a service
 /// resource.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Project> > ListNextAsync(this IProjectsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#4
0
 public static IEnumerable <Project> EnumerateProjects(
     this IProjectsOperations ops, string resourceGroupName, string serviceName)
 {
     return(new PagedEnumerable <Project>(
                () => ops.List(resourceGroupName, serviceName),
                link => ops.ListNext(link)));
 }
示例#5
0
 /// <summary>
 /// Create or update project
 /// </summary>
 /// <remarks>
 /// The project resource is a nested resource representing a stored migration
 /// project. The PUT method creates a new project or updates an existing one.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='parameters'>
 /// Information about the project
 /// </param>
 /// <param name='groupName'>
 /// Name of the resource group
 /// </param>
 /// <param name='serviceName'>
 /// Name of the service
 /// </param>
 /// <param name='projectName'>
 /// Name of the project
 /// </param>
 public static Project CreateOrUpdate(this IProjectsOperations operations, Project parameters, string groupName, string serviceName, string projectName)
 {
     return(operations.CreateOrUpdateAsync(parameters, groupName, serviceName, projectName).GetAwaiter().GetResult());
 }
示例#6
0
 /// <summary>
 /// Get projects in a service
 /// </summary>
 /// <remarks>
 /// The project resource is a nested resource representing a stored migration
 /// project. This method returns a list of projects owned by a service
 /// resource.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupName'>
 /// Name of the resource group
 /// </param>
 /// <param name='serviceName'>
 /// Name of the service
 /// </param>
 public static IPage <Project> List(this IProjectsOperations operations, string groupName, string serviceName)
 {
     return(operations.ListAsync(groupName, serviceName).GetAwaiter().GetResult());
 }
示例#7
0
 /// <summary>
 /// Get projects in a service
 /// </summary>
 /// <remarks>
 /// The project resource is a nested resource representing a stored migration
 /// project. This method returns a list of projects owned by a service
 /// resource.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Project> ListNext(this IProjectsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
示例#8
0
 /// <summary>
 /// Delete project
 /// </summary>
 /// <remarks>
 /// The project resource is a nested resource representing a stored migration
 /// project. The DELETE method deletes a project.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupName'>
 /// Name of the resource group
 /// </param>
 /// <param name='serviceName'>
 /// Name of the service
 /// </param>
 /// <param name='projectName'>
 /// Name of the project
 /// </param>
 /// <param name='deleteRunningTasks'>
 /// Delete the resource even if it contains running tasks
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IProjectsOperations operations, string groupName, string serviceName, string projectName, bool?deleteRunningTasks = default(bool?), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(groupName, serviceName, projectName, deleteRunningTasks, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
示例#9
0
 /// <summary>
 /// Delete project
 /// </summary>
 /// <remarks>
 /// The project resource is a nested resource representing a stored migration
 /// project. The DELETE method deletes a project.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupName'>
 /// Name of the resource group
 /// </param>
 /// <param name='serviceName'>
 /// Name of the service
 /// </param>
 /// <param name='projectName'>
 /// Name of the project
 /// </param>
 /// <param name='deleteRunningTasks'>
 /// Delete the resource even if it contains running tasks
 /// </param>
 public static void Delete(this IProjectsOperations operations, string groupName, string serviceName, string projectName, bool?deleteRunningTasks = default(bool?))
 {
     operations.DeleteAsync(groupName, serviceName, projectName, deleteRunningTasks).GetAwaiter().GetResult();
 }
示例#10
0
 /// <summary>
 /// Get project information
 /// </summary>
 /// <remarks>
 /// The project resource is a nested resource representing a stored migration
 /// project. The GET method retrieves information about a project.
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='groupName'>
 /// Name of the resource group
 /// </param>
 /// <param name='serviceName'>
 /// Name of the service
 /// </param>
 /// <param name='projectName'>
 /// Name of the project
 /// </param>
 public static Project Get(this IProjectsOperations operations, string groupName, string serviceName, string projectName)
 {
     return(operations.GetAsync(groupName, serviceName, projectName).GetAwaiter().GetResult());
 }