This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Startup : IWebJobsStartup | |
| { | |
| public void Configure(IWebJobsBuilder builder) | |
| { | |
| string environment = Environment.GetEnvironmentVariable("AZURE_FUNCTIONS_ENVIRONMENT"); | |
| if (!string.Equals(environment, "Development", StringComparison.OrdinalIgnoreCase)) | |
| { | |
| builder.Services.AddLogging(loggingBuilder => loggingBuilder | |
| .AddSerilog(new LoggerConfiguration() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (request == null) | |
| return new BadRequestErrorMessageResult("Request is empty."); | |
| if (string.IsNullOrWhiteSpace(request.Id)) | |
| return new BadRequestErrorMessageResult($"Missing required value for property '{nameof(ReindeerRescueRequest.Id)}'."); | |
| if (!Guid.TryParse(request.Id, out Guid id)) | |
| return new BadRequestErrorMessageResult($"Value for property '{nameof(ReindeerRescueRequest.Id)}' is not a valid ID or has an invalid format (example of valid value and format for Unique Identifier (GUID): '135996C9-3090-4399-85DB-1F5041DF1DDD')."); | |
| Attempt attempt = await _attemptService.Get(id, expectedVersion: 2, token); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| string body = await httpRequest.Read(logger); | |
| T request; | |
| try | |
| { | |
| request = JsonConvert.DeserializeObject<T>(body); | |
| } | |
| catch (JsonException ex) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "toyDistributionXmlUrl": "https://xmas2019.blob.core.windows.net/toydistribution/data.xml", | |
| "message": "Good job! ..." | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "id": "<<unikt id>>", | |
| "toyDistribution": [ | |
| { | |
| "childName": "Jeppe", | |
| "toyName": "Lego Friends" | |
| }, | |
| { | |
| "childName": "Asta", | |
| "toyName": "Fidgetspinner" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ToyDistributionProblem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
| <Toys> | |
| <Toy Name="Dukkehus" /> | |
| <Toy Name="Barbie dukke" /> | |
| <Toy Name="Lyssværd" /> | |
| ... | |
| </Toys> | |
| <Children> | |
| <Child Name="Laurits"> | |
| <WishList> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async Task Main() | |
| { | |
| using (var httpClient = new HttpClient()) // store instance, dispose when your application shuts down | |
| { | |
| httpClient.BaseAddress = new Uri("https://vertica-xmas2019.azurewebsites.net"); | |
| var participateRequest = new ParticipateRequest | |
| { | |
| FullName = "", | |
| EmailAddress = "", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "id": "<<id>>", | |
| "locations": [ | |
| { | |
| "name": "<<reindeer1>>", | |
| "position": { | |
| "lat": 21.366934221990263, | |
| "lon": 42.37590954272628 | |
| } | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "id": "srx1n4qctdh", | |
| "countryCode": "<<countryCode>>", | |
| "name": "<<name>>", | |
| "location": { | |
| "type": "Point", | |
| "coordinates": [ | |
| 21.366934221990263, | |
| 42.37590954272628 | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "zones": [ | |
| { | |
| "reindeer": "Dancer", | |
| "countryCode": "DE", | |
| "cityName": "Cottbus", | |
| "center": { | |
| "lat": 51.7704, | |
| "lon": 14.33 | |
| }, |