/// <summary> /// Update a Browser Restriction /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> PutBrowserRestrictionAsync(this IFeatureManagementAppTierAPI operations, System.Guid id, BrowserRestriction body = default(BrowserRestriction), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PutBrowserRestrictionWithHttpMessagesAsync(id, body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public async Task <IActionResult> Put(Guid id, BrowserRestriction browserRestriction) { if (id == Guid.Empty) { return(BadRequest("Invalid Id")); } if (browserRestriction == null) { return(BadRequest("BrowserRestriction is required")); } using (IFeatureManagementAppTierAPI api = CreateFeatureManagementApi()) { HttpOperationResponse <object> result = await api.PutBrowserRestrictionWithHttpMessagesAsync(id, browserRestriction); return(CreateResponse <BrowserRestriction>(result)); } }