Пример #1
0
 internal ActiveDirectoryApplicationImpl(ApplicationInner innerObject, GraphRbacManager manager)
     : base(innerObject.DisplayName, innerObject)
 {
     this.manager          = manager;
     this.createParameters = new ApplicationCreateParametersInner
     {
         DisplayName = innerObject.DisplayName
     };
     this.updateParameters = new ApplicationUpdateParametersInner
     {
         DisplayName = innerObject.DisplayName
     };
 }
        ///GENMHASH:F08598A17ADD014E223DFD77272641FF:E166AAF3CE55ADF2533B6CBBEC6343E8
        public async override Task <IApplication> UpdateAsync(CancellationToken cancellationToken = default(CancellationToken))
        {
            var updateParameter = new ApplicationUpdateParametersInner
            {
                DisplayName  = Inner.DisplayName,
                AllowUpdates = Inner.AllowUpdates
            };

            await Parent.Manager.Inner.Application.UpdateAsync(Parent.ResourceGroupName, Parent.Name, Name(), updateParameter, cancellationToken);

            await applicationPackages.CommitAndGetAllAsync(cancellationToken);

            return(this);
        }
 /// <summary>
 /// Updates settings for the specified application.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the Batch account.
 /// </param>
 /// <param name='accountName'>
 /// The name of the Batch account.
 /// </param>
 /// <param name='applicationId'>
 /// The ID of the application.
 /// </param>
 /// <param name='parameters'>
 /// The parameters for the request.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task UpdateAsync(this IApplicationOperations operations, string resourceGroupName, string accountName, string applicationId, ApplicationUpdateParametersInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.UpdateWithHttpMessagesAsync(resourceGroupName, accountName, applicationId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Update an existing application.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='applicationObjectId'>
 /// Application object ID.
 /// </param>
 /// <param name='parameters'>
 /// Parameters to update an existing application.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task PatchAsync(this IApplicationsOperations operations, string applicationObjectId, ApplicationUpdateParametersInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.PatchWithHttpMessagesAsync(applicationObjectId, parameters, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }