public async Task <HttpResponseMessage> Get() { var functions = await FunctionsProvider .List() .ConfigureAwait(continueOnCapturedContext: false); return(this.Request.CreateResponse( value: functions.Select(function => function.ToModel()), statusCode: HttpStatusCode.OK)); }
public async Task <HttpResponseMessage> Delete() { var functions = await FunctionsProvider .List() .ConfigureAwait(continueOnCapturedContext: false); await Task .WhenAll(functions.Select(async function => { await FunctionsProvider .Delete(functionId: function.Id) .ConfigureAwait(continueOnCapturedContext: false); await QueueProvider .DeleteQueue(queueName: function.Id) .ConfigureAwait(continueOnCapturedContext: false); })) .ConfigureAwait(continueOnCapturedContext: false); return(this.Request.CreateResponse(statusCode: HttpStatusCode.NoContent)); }