This file contains 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
<Style TargetType="Switch"> | |
<Setter Property="OnColor" Value="Black" /> | |
</Style> |
This file contains 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
// Tell app center you want the data in list form | |
var dbResult = await Data.ListAsync<UserInterests>( | |
DefaultPartitions.UserDocuments | |
); | |
var userInterests = new List<UserInterests>(); | |
// deserialize the first page | |
userInterests.AddRange(dbResult.CurrentPage.Items.Select(i => i.DeserializedValue)); | |
// check if there are additional pages |
This file contains 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
await Data.CreateAsync<UserInterests>(newsCategory.CategoryName, | |
new UserInterests { NewsCategoryName = newsCategory.CategoryName }, | |
DefaultPartitions.UserDocuments); |
This file contains 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
{ | |
"IsEncrypted": false, | |
"Values": { | |
"AzureWebJobsStorage": "UseDevelopmentStorage=true", | |
"FUNCTIONS_WORKER_RUNTIME": "dotnet", | |
"APIKey": "YOUR KEY WILL GO HERE", | |
"APIEndpoint": "https://westus2.api.cognitive.microsoft.com/" | |
} | |
} |
This file contains 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 async Task<SantaResults> WriteLetterToSanta(SantaLetter letter) | |
{ | |
SantaResults results = null; | |
try | |
{ | |
var letterJson = JsonConvert.SerializeObject(letter); | |
var httpResponse = await httpClient.PostAsync(santaUrl, new StringContent(letterJson)); | |
results = JsonConvert.DeserializeObject<SantaResults>(await httpResponse.Content.ReadAsStringAsync()); |
This file contains 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
[FunctionName("WriteSanta")] | |
public static async Task<IActionResult> Run( | |
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] SantaLetter theLetter, | |
ILogger log) | |
{ | |
SantaResults result; | |
try | |
{ | |
// Get the languages |
This file contains 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
az cognitiveservices account create \ | |
--kind TextAnalytics \ | |
--location westus2 \ | |
--sku F0 \ | |
--resource-group SantaTalk \ | |
--name YOUR-SERVICE-NAME-HERE |
This file contains 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
<FlyoutItem Title="The News"> | |
<FlyoutItem.Icon> | |
<FontImageSource | |
Color="Red" | |
FontFamily="{StaticResource FabMDL2}" | |
Glyph="" /> | |
</FlyoutItem.Icon> | |
<Tab Title="My News"> | |
<ShellContent Title="My News"> | |
<local:NewsCollectionPage Title="My News" /> |
This file contains 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
<FlyoutItem Title="My Interests"> | |
<FlyoutItem.Icon> | |
<FontImageSource | |
Color="Red" | |
FontFamily="{StaticResource FabMDL2}" | |
Glyph="" /> | |
</FlyoutItem.Icon> | |
<ShellContent> | |
<local:MyInterestsPage /> | |
</ShellContent> |