/// <summary> /// Gets a list of repositories metadata. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// The name of the workspace. /// </param> /// <param name='repoType'> /// The repo type. Possible values include: 'Github', 'DevOps' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <Repo> > ListRepositoriesAsync(this ISourceControlOperations operations, string resourceGroupName, string workspaceName, string repoType, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListRepositoriesWithHttpMessagesAsync(resourceGroupName, workspaceName, repoType, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Gets a list of repositories metadata. /// </summary> /// <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 <Repo> > ListRepositoriesNextAsync(this ISourceControlOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListRepositoriesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Create a source control. /// <see href="http://aka.ms/azureautomationsdk/sourcecontroloperations" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of an Azure Resource group. /// </param> /// <param name='automationAccountName'> /// The name of the automation account. /// </param> /// <param name='sourceControlName'> /// The source control name. /// </param> /// <param name='parameters'> /// The parameters supplied to the create or update source control operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SourceControl> CreateOrUpdateAsync(this ISourceControlOperations operations, string resourceGroupName, string automationAccountName, string sourceControlName, SourceControlCreateOrUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, automationAccountName, sourceControlName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// List source controls for user. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.WebSites.ISourceControlOperations. /// </param> /// <returns> /// The list source controls operation response. /// </returns> public static SourceControlListResponse List(this ISourceControlOperations operations) { return(Task.Factory.StartNew((object s) => { return ((ISourceControlOperations)s).ListAsync(); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Update source control for user. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.WebSites.ISourceControlOperations. /// </param> /// <param name='name'> /// Required. The name of the source control (can be: GitHub, /// Bitbucket, CodePlex, Dropbox) /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Update Source Control /// operation. /// </param> /// <returns> /// The update source control operation response. /// </returns> public static SourceControlUpdateResponse Update(this ISourceControlOperations operations, string name, SourceControlUpdateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((ISourceControlOperations)s).UpdateAsync(name, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the WebSiteManagementClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> public WebSiteManagementClient(HttpClient httpClient) : base(httpClient) { this._sourceControls = new SourceControlOperations(this); this._webHostingPlans = new WebHostingPlanOperations(this); this._webSites = new WebSiteOperations(this); this._apiVersion = "2014-06-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <summary> /// Gets a list of repositories metadata. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group. The name is case insensitive. /// </param> /// <param name='workspaceName'> /// The name of the workspace. /// </param> /// <param name='repoType'> /// The repo type. Possible values include: 'Github', 'DevOps' /// </param> public static IPage <Repo> ListRepositories(this ISourceControlOperations operations, string resourceGroupName, string workspaceName, string repoType) { return(operations.ListRepositoriesAsync(resourceGroupName, workspaceName, repoType).GetAwaiter().GetResult()); }
/// <summary> /// Get user source control /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.WebSites.ISourceControlOperations. /// </param> /// <param name='name'> /// Required. The name of the source control (GitHub, Bitbucket, /// CodePlex or Dropbox) /// </param> /// <returns> /// The get source control operation response. /// </returns> public static Task <SourceControlGetResponse> GetAsync(this ISourceControlOperations operations, string name) { return(operations.GetAsync(name, CancellationToken.None)); }
/// <summary> /// Update source control for user. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.WebSites.ISourceControlOperations. /// </param> /// <param name='name'> /// Required. The name of the source control (can be: GitHub, /// Bitbucket, CodePlex, Dropbox) /// </param> /// <param name='parameters'> /// Required. Parameters supplied to the Update Source Control /// operation. /// </param> /// <returns> /// The update source control operation response. /// </returns> public static Task <SourceControlUpdateResponse> UpdateAsync(this ISourceControlOperations operations, string name, SourceControlUpdateParameters parameters) { return(operations.UpdateAsync(name, parameters, CancellationToken.None)); }
/// <summary> /// Delete the source control. /// <see href="http://aka.ms/azureautomationsdk/sourcecontroloperations" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of an Azure Resource group. /// </param> /// <param name='automationAccountName'> /// The name of the automation account. /// </param> /// <param name='sourceControlName'> /// The name of source control. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this ISourceControlOperations operations, string resourceGroupName, string automationAccountName, string sourceControlName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, sourceControlName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Update a source control. /// <see href="http://aka.ms/azureautomationsdk/sourcecontroloperations" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of an Azure Resource group. /// </param> /// <param name='automationAccountName'> /// The name of the automation account. /// </param> /// <param name='sourceControlName'> /// The source control name. /// </param> /// <param name='parameters'> /// The parameters supplied to the update source control operation. /// </param> public static SourceControl Update(this ISourceControlOperations operations, string resourceGroupName, string automationAccountName, string sourceControlName, SourceControlUpdateParameters parameters) { return(operations.UpdateAsync(resourceGroupName, automationAccountName, sourceControlName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Retrieve a list of source controls. /// <see href="http://aka.ms/azureautomationsdk/sourcecontroloperations" /> /// </summary> /// <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 <SourceControl> ListByAutomationAccountNext(this ISourceControlOperations operations, string nextPageLink) { return(operations.ListByAutomationAccountNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Retrieve a list of source controls. /// <see href="http://aka.ms/azureautomationsdk/sourcecontroloperations" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of an Azure Resource group. /// </param> /// <param name='automationAccountName'> /// The name of the automation account. /// </param> /// <param name='filter'> /// The filter to apply on the operation. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IPage <SourceControl> > ListByAutomationAccountAsync(this ISourceControlOperations operations, string resourceGroupName, string automationAccountName, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByAutomationAccountWithHttpMessagesAsync(resourceGroupName, automationAccountName, filter, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Retrieve a list of source controls. /// <see href="http://aka.ms/azureautomationsdk/sourcecontroloperations" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of an Azure Resource group. /// </param> /// <param name='automationAccountName'> /// The name of the automation account. /// </param> /// <param name='filter'> /// The filter to apply on the operation. /// </param> public static IPage <SourceControl> ListByAutomationAccount(this ISourceControlOperations operations, string resourceGroupName, string automationAccountName, string filter = default(string)) { return(operations.ListByAutomationAccountAsync(resourceGroupName, automationAccountName, filter).GetAwaiter().GetResult()); }
/// <summary> /// Retrieve the source control identified by source control name. /// <see href="http://aka.ms/azureautomationsdk/sourcecontroloperations" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of an Azure Resource group. /// </param> /// <param name='automationAccountName'> /// The name of the automation account. /// </param> /// <param name='sourceControlName'> /// The name of source control. /// </param> public static SourceControl Get(this ISourceControlOperations operations, string resourceGroupName, string automationAccountName, string sourceControlName) { return(operations.GetAsync(resourceGroupName, automationAccountName, sourceControlName).GetAwaiter().GetResult()); }
/// <summary> /// Gets a list of repositories metadata. /// </summary> /// <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 <Repo> ListRepositoriesNext(this ISourceControlOperations operations, string nextPageLink) { return(operations.ListRepositoriesNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// List source controls for user. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.Azure.Management.WebSites.ISourceControlOperations. /// </param> /// <returns> /// The list source controls operation response. /// </returns> public static Task <SourceControlListResponse> ListAsync(this ISourceControlOperations operations) { return(operations.ListAsync(CancellationToken.None)); }
/// <summary> /// Delete the source control. /// <see href="http://aka.ms/azureautomationsdk/sourcecontroloperations" /> /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// Name of an Azure Resource group. /// </param> /// <param name='automationAccountName'> /// The name of the automation account. /// </param> /// <param name='sourceControlName'> /// The name of source control. /// </param> public static void Delete(this ISourceControlOperations operations, string resourceGroupName, string automationAccountName, string sourceControlName) { operations.DeleteAsync(resourceGroupName, automationAccountName, sourceControlName).GetAwaiter().GetResult(); }